Skip to content

Commit

Permalink
fix: apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Apr 3, 2024
1 parent d9e9515 commit 0ee4dcb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/components/AddPlaidBankAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type AddPlaidBankAccountProps = AddPlaidBankAccountOnyxProps & {
isDisplayedInNewVBBA?: boolean;

/** Is displayed in new enable wallet flow */
isNewWalletFlow?: boolean;
isDisplayedInWalletFlow?: boolean;

/** Text to display on error message */
errorText?: string;
Expand All @@ -87,7 +87,7 @@ function AddPlaidBankAccount({
isDisplayedInNewVBBA = false,
errorText = '',
onInputChange = () => {},
isNewWalletFlow = false,
isDisplayedInWalletFlow = false,
}: AddPlaidBankAccountProps) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -259,10 +259,10 @@ function AddPlaidBankAccount({
return <FullPageOfflineBlockingView>{renderPlaidLink()}</FullPageOfflineBlockingView>;
}

if (isDisplayedInNewVBBA || isNewWalletFlow) {
if (isDisplayedInNewVBBA || isDisplayedInWalletFlow) {
return (
<FullPageOfflineBlockingView>
<Text style={[styles.mb3, styles.textHeadlineLineHeightXXL]}>{translate(isNewWalletFlow ? 'walletPage.chooseYourBankAccount' : 'bankAccount.chooseAnAccount')}</Text>
<Text style={[styles.mb3, styles.textHeadlineLineHeightXXL]}>{translate(isDisplayedInWalletFlow ? 'walletPage.chooseYourBankAccount' : 'bankAccount.chooseAnAccount')}</Text>
{!!text && <Text style={[styles.mb6, styles.textSupporting]}>{text}</Text>}
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mb6]}>
<Icon
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EnablePayments/AddBankAccount/SetupMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function SetupMethod({isPlaidDisabled, user}: SetupMethodProps) {
<Section
icon={Illustrations.MoneyWings}
title={translate('walletPage.addYourBankAccount')}
titleStyles={[styles.textXLarge]}
titleStyles={[styles.textHeadlineLineHeightXXL]}
>
<View style={[styles.mv3]}>
<Text>{translate('walletPage.addBankAccountBody')}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function PlaidStep({personalBankAccountDraft, onNext, plaidData}: PlaidStepProps
plaidData={plaidData}
onExitPlaid={BankAccounts.clearPersonalBankAccountSetupType}
allowDebit
isNewWalletFlow
isDisplayedInWalletFlow
selectedPlaidAccountID={selectedPlaidAccountID}
inputID={BANK_INFO_STEP_KEYS.SELECTED_PLAID_ACCOUNT_ID}
defaultValue={selectedPlaidAccountID}
Expand Down
8 changes: 7 additions & 1 deletion src/pages/settings/Wallet/WalletPage/WalletPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,13 @@ function WalletPage({bankAccountList = {}, cardList = {}, fundList = {}, isLoadi

<KYCWall
onSuccessfulKYC={(_iouPaymentType?: PaymentMethodType, source?: Source) => navigateToWalletOrTransferBalancePage(source)}
onSelectPaymentMethod={() => Navigation.navigate(ROUTES.SETTINGS_ADD_BANK_ACCOUNT)}
onSelectPaymentMethod={(selectedPaymentMethod: string) => {
if (hasActivatedWallet || selectedPaymentMethod !== CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT) {
return;
}
// To allow upgrading to a gold wallet, continue with the KYC flow after adding a bank account
BankAccounts.setPersonalBankAccountContinueKYCOnSuccess(ROUTES.SETTINGS_WALLET);
}}
enablePaymentsRoute={ROUTES.SETTINGS_ENABLE_PAYMENTS}
addBankAccountRoute={ROUTES.SETTINGS_ADD_BANK_ACCOUNT}
addDebitCardRoute={ROUTES.SETTINGS_ADD_DEBIT_CARD}
Expand Down
5 changes: 0 additions & 5 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,6 @@ const styles = (theme: ThemeColors) =>
fontSize: variables.fontSizeLarge,
},

textXLarge: {
fontSize: variables.fontSizeXLarge,
lineHeight: variables.lineHeightXXLarge,
},

textXXLarge: {
fontSize: variables.fontSizeXXLarge,
},
Expand Down

0 comments on commit 0ee4dcb

Please sign in to comment.