From 1a67028745822a2e9484dbe71f20a77720cc2af2 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Thu, 10 Sep 2026 23:59:55 +0700 Subject: [PATCH 1/2] Blank personal info RHP displayed while adding bank account --- src/libs/actions/BankAccounts.ts | 8 ++++++-- src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/BankAccounts.ts b/src/libs/actions/BankAccounts.ts index 8632c150be68..ce78f41a8212 100644 --- a/src/libs/actions/BankAccounts.ts +++ b/src/libs/actions/BankAccounts.ts @@ -442,8 +442,11 @@ function getOnyxDataForConnectingVBBAAndLastPaymentMethod(policyID?: string, las /** * Submit Bank Account step with Plaid data so php can perform some checks. + * + * @returns true when the user was redirected to the manual flow (Chase returns dummy numbers via Plaid), + * in which case no bank account was created and the caller must not advance to the next step. */ -function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAccount: PlaidBankAccount, policyID: string | undefined) { +function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAccount: PlaidBankAccount, policyID: string | undefined): boolean { const isChaseBank = selectedPlaidBankAccount.bankName?.toLowerCase() === CONST.BANK_NAMES.CHASE; if (bankAccountID === CONST.DEFAULT_NUMBER_ID && isChaseBank) { Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, { @@ -457,7 +460,7 @@ function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAcc accountNumber: '', routingNumber: '', }); - return; + return true; } const parameters: ConnectBankAccountParams = { @@ -473,6 +476,7 @@ function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAcc }; API.write(WRITE_COMMANDS.CONNECT_BANK_ACCOUNT_WITH_PLAID, parameters, getVBBADataForOnyx()); + return false; } /** diff --git a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx index 0d9aac556000..6c80ad78d6eb 100644 --- a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx +++ b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx @@ -80,7 +80,7 @@ function BankInfo({onBackButtonPress, onSubmit, policyID}: BankInfoProps) { if (plaidAccountIDChanged) { deletePaymentBankAccount(bankAccountID, undefined); } - connectBankAccountWithPlaid( + const redirectedToManual = connectBankAccountWithPlaid( plaidAccountIDChanged ? CONST.DEFAULT_NUMBER_ID : bankAccountID, { [BANK_INFO_STEP_KEYS.ROUTING_NUMBER]: data[BANK_INFO_STEP_KEYS.ROUTING_NUMBER] ?? '', @@ -93,6 +93,11 @@ function BankInfo({onBackButtonPress, onSubmit, policyID}: BankInfoProps) { }, policyID, ); + + // No bank account was created; stay on this step so the manual form can create it before advancing. + if (redirectedToManual) { + return; + } } markSubmitting(); }; From 1dc9625a8ffcfa69c80e00c7c1de31a46eec9bd0 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 11 Sep 2026 10:29:13 +0700 Subject: [PATCH 2/2] update comments --- src/libs/actions/BankAccounts.ts | 3 +-- src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/BankAccounts.ts b/src/libs/actions/BankAccounts.ts index ce78f41a8212..920c0eecfdd2 100644 --- a/src/libs/actions/BankAccounts.ts +++ b/src/libs/actions/BankAccounts.ts @@ -443,8 +443,7 @@ function getOnyxDataForConnectingVBBAAndLastPaymentMethod(policyID?: string, las /** * Submit Bank Account step with Plaid data so php can perform some checks. * - * @returns true when the user was redirected to the manual flow (Chase returns dummy numbers via Plaid), - * in which case no bank account was created and the caller must not advance to the next step. + * @returns true when redirected to the manual flow (Chase Plaid dummy numbers). */ function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAccount: PlaidBankAccount, policyID: string | undefined): boolean { const isChaseBank = selectedPlaidBankAccount.bankName?.toLowerCase() === CONST.BANK_NAMES.CHASE; diff --git a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx index 6c80ad78d6eb..864d4a123b5e 100644 --- a/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx +++ b/src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx @@ -94,7 +94,7 @@ function BankInfo({onBackButtonPress, onSubmit, policyID}: BankInfoProps) { policyID, ); - // No bank account was created; stay on this step so the manual form can create it before advancing. + // No bank account was created. Stay on this step so the manual form can create it before advancing. if (redirectedToManual) { return; }