diff --git a/src/screens/rewards/components/RewardsContent.tsx b/src/screens/rewards/components/RewardsContent.tsx index 0fdcb78b41f..43f5f69169d 100644 --- a/src/screens/rewards/components/RewardsContent.tsx +++ b/src/screens/rewards/components/RewardsContent.tsx @@ -6,7 +6,7 @@ import { RewardsStats } from './RewardsStats'; import { RewardsFakeContent } from '@/screens/rewards/components/RewardsFakeContent'; import { RewardsProgramStatus } from '@/screens/rewards/components/RewardsProgramStatus'; import * as i18n from '@/languages'; -import InfoAlert from '@/components/info-alert/info-alert'; +import { InfoAlert } from '@/components/info-alert/info-alert'; import { Box, Text } from '@/design-system'; type Props = { diff --git a/src/screens/rewards/components/RewardsSectionCard.tsx b/src/screens/rewards/components/RewardsSectionCard.tsx index cc29cf7c496..5531010acb0 100644 --- a/src/screens/rewards/components/RewardsSectionCard.tsx +++ b/src/screens/rewards/components/RewardsSectionCard.tsx @@ -1,6 +1,8 @@ import React, { PropsWithChildren } from 'react'; import { View } from 'react-native'; import { Box, Space, globalColors } from '@/design-system'; +import { IS_ANDROID, IS_IOS } from '@/env'; +import { useTheme } from '@/theme'; type Props = { paddingVertical?: Space; @@ -12,22 +14,36 @@ export function RewardsSectionCard({ paddingVertical = '20px', paddingHorizontal = '20px', }: PropsWithChildren) { + const { isDarkMode } = useTheme(); + return ( = ({ (state: AppState) => state.settings.nativeCurrency ); - const swapsData = useMemo(() => { - return actions.find(action => action.type === RewardStatsActionType.Swap); - }, [actions]); + const swapsData = actions.find( + action => action.type === RewardStatsActionType.Swap + ); - const bridgeData = useMemo(() => { - return actions.find(action => action.type === RewardStatsActionType.Bridge); - }, [actions]); + const bridgeData = actions.find( + action => action.type === RewardStatsActionType.Bridge + ); const getSwapsValue = useMemo(() => { if (assetPrice) { @@ -46,7 +46,12 @@ export const RewardsStats: React.FC = ({ } return convertAmountToNativeDisplay(swapsData?.amount?.usd || '0', 'USD'); - }, [swapsData, assetPrice, nativeCurrency]); + }, [ + assetPrice, + nativeCurrency, + swapsData?.amount?.token, + swapsData?.amount?.usd, + ]); const getBridgeValue = useMemo(() => { if (assetPrice) { @@ -58,7 +63,12 @@ export const RewardsStats: React.FC = ({ } return convertAmountToNativeDisplay(bridgeData?.amount?.usd || '0', 'USD'); - }, [bridgeData, assetPrice, nativeCurrency]); + }, [ + assetPrice, + nativeCurrency, + bridgeData?.amount?.token, + bridgeData?.amount?.usd, + ]); return (