diff --git a/src/pages/settings/Wallet/WalletEmptyState.js b/src/pages/settings/Wallet/WalletEmptyState.js index adfd2cf49cee..f54716e3110a 100644 --- a/src/pages/settings/Wallet/WalletEmptyState.js +++ b/src/pages/settings/Wallet/WalletEmptyState.js @@ -9,6 +9,7 @@ import ROUTES from '../../../ROUTES'; import * as Illustrations from '../../../components/Icon/Illustrations'; import FeatureList from '../../../components/FeatureList'; import themeColors from '../../../styles/themes/default'; +import SCREENS from '../../../SCREENS'; const propTypes = { /** The function that is called when a menu item is pressed */ @@ -34,7 +35,7 @@ function WalletEmptyState({onAddPaymentMethod}) { const {translate} = useLocalize(); return ( Navigation.goBack(ROUTES.SETTINGS)} title={translate('common.wallet')} diff --git a/src/pages/settings/Wallet/WalletPage/WalletPage.js b/src/pages/settings/Wallet/WalletPage/WalletPage.js index 37bb49952984..d1a2e4780f0d 100644 --- a/src/pages/settings/Wallet/WalletPage/WalletPage.js +++ b/src/pages/settings/Wallet/WalletPage/WalletPage.js @@ -6,7 +6,7 @@ import PaymentMethodList from '../PaymentMethodList'; import ROUTES from '../../../../ROUTES'; import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Navigation, {navigationRef} from '../../../../libs/Navigation/Navigation'; +import Navigation from '../../../../libs/Navigation/Navigation'; import styles from '../../../../styles/styles'; import compose from '../../../../libs/compose'; import * as BankAccounts from '../../../../libs/actions/BankAccounts'; @@ -61,7 +61,7 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen const [showConfirmDeleteContent, setShowConfirmDeleteContent] = useState(false); const hasBankAccount = !_.isEmpty(bankAccountList) || !_.isEmpty(fundList); - const hasWallet = userWallet.walletLinkedAccountID > 0; + const hasWallet = !_.isEmpty(userWallet); const hasActivatedWallet = _.contains([CONST.WALLET.TIER_NAME.GOLD, CONST.WALLET.TIER_NAME.PLATINUM], userWallet.tierName); const hasAssignedCard = !_.isEmpty(cardList); const shouldShowEmptyState = !hasBankAccount && !hasWallet && !hasAssignedCard; @@ -299,13 +299,6 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen } }, [hideDefaultDeleteMenu, paymentMethod.methodID, paymentMethod.selectedPaymentMethodType, bankAccountList, fundList, shouldShowDefaultDeleteMenu]); - useEffect(() => { - if (!shouldShowEmptyState) { - return; - } - navigationRef.setParams({backgroundColor: themeColors.walletPageBG}); - }, [shouldShowEmptyState]); - const shouldShowMakeDefaultButton = !paymentMethod.isSelectedPaymentMethodDefault && Permissions.canUseWallet(betas) && diff --git a/src/styles/themes/default.ts b/src/styles/themes/default.ts index aabe9140bf9d..1dae2567d76e 100644 --- a/src/styles/themes/default.ts +++ b/src/styles/themes/default.ts @@ -91,6 +91,7 @@ darkTheme.PAGE_BACKGROUND_COLORS = { [SCREENS.SAVE_THE_WORLD.ROOT]: colors.tangerine800, [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, + [SCREENS.SETTINGS.WALLET]: colors.darkAppBackground, [SCREENS.SETTINGS.SECURITY]: colors.ice500, [SCREENS.SETTINGS.STATUS]: colors.green700, [SCREENS.SETTINGS.ROOT]: darkTheme.sidebar, diff --git a/src/styles/themes/light.ts b/src/styles/themes/light.ts index cd3079c3313f..3fa0e6937397 100644 --- a/src/styles/themes/light.ts +++ b/src/styles/themes/light.ts @@ -90,7 +90,7 @@ lightTheme.PAGE_BACKGROUND_COLORS = { [SCREENS.HOME]: lightTheme.sidebar, [SCREENS.SAVE_THE_WORLD.ROOT]: colors.tangerine800, [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, - [SCREENS.SETTINGS.WALLET]: colors.green700, + [SCREENS.SETTINGS.WALLET]: colors.darkAppBackground, [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, [SCREENS.SETTINGS.SECURITY]: colors.ice500, [SCREENS.SETTINGS.STATUS]: colors.green700,