@@ -24,13 +24,8 @@ import BadgeWrapper, {
2424import BadgeNetwork from '../../../../../../component-library/components/Badges/Badge/variants/BadgeNetwork' ;
2525import { getNetworkImageSource } from '../../../../../../util/networks' ;
2626import type { Hex } from '@metamask/utils' ;
27- import type { InternalAccount } from '@metamask/keyring-internal-api' ;
2827import type { BridgeToken } from '../../../../../UI/Bridge/types' ;
2928import SourceTokenPicker from './SourceTokenPicker' ;
30- import RewardsAnimations , {
31- RewardAnimationState ,
32- } from '../../../../../UI/Rewards/components/RewardPointsAnimation' ;
33- import AddRewardsAccount from '../../../../../UI/Rewards/components/AddRewardsAccount/AddRewardsAccount' ;
3429import { strings } from '../../../../../../../locales/i18n' ;
3530
3631const USD_PRESETS = [ '1' , '20' , '50' , '100' ] ;
@@ -47,13 +42,6 @@ interface QuickBuyFooterProps {
4742 React . SetStateAction < BridgeToken | undefined >
4843 > ;
4944 sourceBalanceFiat : string | undefined ;
50- estimatedPoints : number | null ;
51- isRewardsLoading : boolean ;
52- shouldShowLiveRewardsEstimate : boolean ;
53- shouldShowRewardsOptInCta : boolean ;
54- shouldShowRewardsFallbackZero : boolean ;
55- hasRewardsError : boolean ;
56- rewardsAccountScope : InternalAccount | null ;
5745 isConfirmDisabled : boolean ;
5846 isConfirmLoading : boolean ;
5947 getButtonLabel : ( ) => string ;
@@ -72,13 +60,6 @@ const QuickBuyFooter: React.FC<QuickBuyFooterProps> = ({
7260 setIsSourcePickerOpen,
7361 setSelectedSourceToken,
7462 sourceBalanceFiat,
75- estimatedPoints,
76- isRewardsLoading,
77- shouldShowLiveRewardsEstimate,
78- shouldShowRewardsOptInCta,
79- shouldShowRewardsFallbackZero,
80- hasRewardsError,
81- rewardsAccountScope,
8263 isConfirmDisabled,
8364 isConfirmLoading,
8465 getButtonLabel,
@@ -217,61 +198,6 @@ const QuickBuyFooter: React.FC<QuickBuyFooterProps> = ({
217198 { `$${ usdAmount || '0' } ` }
218199 </ Text >
219200 </ Box >
220-
221- { /* Est. points row */ }
222- < Box
223- flexDirection = { BoxFlexDirection . Row }
224- alignItems = { BoxAlignItems . Center }
225- justifyContent = { BoxJustifyContent . Between }
226- >
227- < Box
228- flexDirection = { BoxFlexDirection . Row }
229- alignItems = { BoxAlignItems . Center }
230- gap = { 2 }
231- >
232- < Text
233- variant = { TextVariant . BodyMd }
234- color = { TextColor . TextAlternative }
235- >
236- { strings ( 'social_leaderboard.quick_buy.est_points' ) }
237- </ Text >
238- < Icon
239- name = { IconName . Info }
240- size = { IconSize . Sm }
241- color = { colors . icon . alternative }
242- />
243- </ Box >
244- < Box alignItems = { BoxAlignItems . End } >
245- { shouldShowLiveRewardsEstimate ? (
246- < RewardsAnimations
247- value = { estimatedPoints ?? 0 }
248- state = {
249- isRewardsLoading
250- ? RewardAnimationState . Loading
251- : hasRewardsError
252- ? RewardAnimationState . ErrorState
253- : RewardAnimationState . Idle
254- }
255- />
256- ) : shouldShowRewardsOptInCta ? (
257- < AddRewardsAccount
258- testID = "quick-buy-add-rewards-account"
259- account = { rewardsAccountScope ?? undefined }
260- />
261- ) : shouldShowRewardsFallbackZero ? (
262- < Text variant = { TextVariant . BodyMd } color = { TextColor . TextDefault } >
263- 0
264- </ Text >
265- ) : (
266- < Text
267- variant = { TextVariant . BodyMd }
268- color = { TextColor . TextAlternative }
269- >
270- -
271- </ Text >
272- ) }
273- </ Box >
274- </ Box >
275201 </ Box >
276202
277203 { /* Buy button */ }
0 commit comments