File tree Expand file tree Collapse file tree
components/MoneyOnboardingCard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,26 +210,6 @@ const MoneyHomeView = () => {
210210 showMoneyActivityUnderConstructionAlert ( ) ;
211211 } , [ ] ) ;
212212
213- const handleOnboardingCtaPress = useCallback ( ( ) => {
214- if ( isCardholderWithMilestone ) {
215- handleLinkCardPress ( ) ;
216- return ;
217- }
218-
219- if ( isMilestone ) {
220- handleCardPress ( ) ;
221- return ;
222- }
223-
224- handleAddPress ( ) ;
225- } , [
226- isCardholderWithMilestone ,
227- isMilestone ,
228- handleLinkCardPress ,
229- handleCardPress ,
230- handleAddPress ,
231- ] ) ;
232-
233213 let metamaskCardMode : 'upsell' | 'link' | 'manage' ;
234214 if ( isCardholderWithMilestone && isUS ) {
235215 metamaskCardMode = 'manage' ;
Original file line number Diff line number Diff line change @@ -39,9 +39,13 @@ const MoneyOnboardingCard = () => {
3939 const { moneyAccountCardToken, canLink, openLinkCardSheet } =
4040 useMoneyAccountCardLinkage ( ) ;
4141
42- const conversionTokensFiatTotal = tokens . reduce (
43- ( acc , token ) => acc . plus ( new BigNumber ( token . fiat ?. balance ?? 0 ) ) ,
44- new BigNumber ( 0 ) ,
42+ const conversionTokensFiatTotal = useMemo (
43+ ( ) =>
44+ tokens . reduce (
45+ ( acc , token ) => acc . plus ( new BigNumber ( token . fiat ?. balance ?? 0 ) ) ,
46+ new BigNumber ( 0 ) ,
47+ ) ,
48+ [ tokens ] ,
4549 ) ;
4650
4751 const conversionTokensFiatTotalFormatted = moneyFormatFiat (
You can’t perform that action at this time.
0 commit comments