From af051141f67ff552ca4b5b1fae6d24f6467d9ecb Mon Sep 17 00:00:00 2001 From: Sam Hariri <137707942+samh-nl@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:56:29 +0200 Subject: [PATCH 01/23] feat: add enable wallet button --- src/languages/en.ts | 2 + src/languages/es.ts | 2 + .../settings/Wallet/WalletPage/WalletPage.js | 37 +++++++++++++------ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 9d376c73ea62..200abc828554 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -845,6 +845,8 @@ export default { receiveMoney: 'Receive money in your local currency', expensifyWallet: 'Expensify Wallet', sendAndReceiveMoney: 'Send and receive money from your Expensify Wallet.', + enableWalletToSendAndReceiveMoney: 'Enable your Expensify Wallet to start sending and receiving money with friends!', + enableWallet: 'Enable wallet', bankAccounts: 'Bank accounts', addBankAccountToSendAndReceive: 'Add a bank account to send and receive payments directly in the app.', addBankAccount: 'Add bank account', diff --git a/src/languages/es.ts b/src/languages/es.ts index 316cd1eaed21..7b1f789a3086 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -841,6 +841,8 @@ export default { receiveMoney: 'Recibe dinero en tu moneda local', expensifyWallet: 'Billetera Expensify', sendAndReceiveMoney: 'Envía y recibe dinero desde tu Billetera Expensify.', + enableWalletToSendAndReceiveMoney: 'Habilita tu Billetera Expensify para comenzar a enviar y recibir dinero con amigos', + enableWallet: 'Habilitar Billetera', bankAccounts: 'Cuentas bancarias', addBankAccountToSendAndReceive: 'Añade una cuenta bancaria para enviar y recibir pagos directamente en la aplicación.', addBankAccount: 'Agregar cuenta bancaria', diff --git a/src/pages/settings/Wallet/WalletPage/WalletPage.js b/src/pages/settings/Wallet/WalletPage/WalletPage.js index 4115335bbcd5..c9bb89f5d174 100644 --- a/src/pages/settings/Wallet/WalletPage/WalletPage.js +++ b/src/pages/settings/Wallet/WalletPage/WalletPage.js @@ -62,6 +62,7 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen const hasBankAccount = !_.isEmpty(bankAccountList) || !_.isEmpty(fundList); const hasWallet = userWallet.walletLinkedAccountID > 0; + const hasSilverWallet = userWallet.tierName === CONST.WALLET.TIER_NAME.SILVER; const hasAssignedCard = !_.isEmpty(cardList); const shouldShowEmptyState = !hasBankAccount && !hasWallet && !hasAssignedCard; @@ -330,7 +331,7 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen {hasWallet && ( <> @@ -358,17 +359,29 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen addDebitCardRoute={ROUTES.SETTINGS_ADD_DEBIT_CARD} popoverPlacement="bottom" > - {(triggerKYCFlow, buttonRef) => ( - - )} + {(triggerKYCFlow, buttonRef) => + hasSilverWallet ? ( +