Skip to content

Commit f7a147e

Browse files
authored
Merge pull request Expensify#66208 from FitseTLT/fix-offline-mode-add-bank-account-flow
Fix - Connect bank account-You appear to be offline is not displayed when starting over
2 parents 11a4e3c + 3b54866 commit f7a147e

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy}: Reimbursemen
471471

472472
return (
473473
<VerifiedBankAccountFlowEntryPoint
474+
setShouldShowContinueSetupButton={setShouldShowContinueSetupButton}
474475
reimbursementAccount={reimbursementAccount}
475476
onContinuePress={isNonUSDWorkspace ? continueNonUSDVBBASetup : continueUSDVBBASetup}
476477
policyName={policyName}

src/pages/ReimbursementAccount/VerifiedBankAccountFlowEntryPoint.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ type VerifiedBankAccountFlowEntryPointProps = {
6969

7070
/** Set step for USD flow */
7171
setUSDBankAccountStep: (shouldShowContinueSetupButton: string | null) => void;
72+
73+
/** Method to set the state of shouldShowContinueSetupButton */
74+
setShouldShowContinueSetupButton?: (shouldShowContinueSetupButton: boolean) => void;
7275
};
7376

7477
const bankInfoStepKeys = INPUT_IDS.BANK_INFO_STEP;
@@ -85,6 +88,7 @@ function VerifiedBankAccountFlowEntryPoint({
8588
toggleValidateCodeActionModal,
8689
setNonUSDBankAccountStep,
8790
setUSDBankAccountStep,
91+
setShouldShowContinueSetupButton,
8892
}: VerifiedBankAccountFlowEntryPointProps) {
8993
const theme = useTheme();
9094
const styles = useThemeStyles();
@@ -307,6 +311,7 @@ function VerifiedBankAccountFlowEntryPoint({
307311
isNonUSDWorkspace={isNonUSDWorkspace}
308312
setUSDBankAccountStep={setUSDBankAccountStep}
309313
setNonUSDBankAccountStep={setNonUSDBankAccountStep}
314+
setShouldShowContinueSetupButton={setShouldShowContinueSetupButton}
310315
/>
311316
)}
312317

src/pages/workspace/WorkspaceResetBankAccountModal.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ type WorkspaceResetBankAccountModalProps = {
1717
/** Method to set the state of shouldShowConnectedVerifiedBankAccount */
1818
setShouldShowConnectedVerifiedBankAccount?: (shouldShowConnectedVerifiedBankAccount: boolean) => void;
1919

20+
/** Method to set the state of shouldShowContinueSetupButton */
21+
setShouldShowContinueSetupButton?: (shouldShowContinueSetupButton: boolean) => void;
22+
2023
/** Method to set the state of setUSDBankAccountStep */
2124
setUSDBankAccountStep?: (step: string | null) => void;
2225

@@ -33,6 +36,7 @@ function WorkspaceResetBankAccountModal({
3336
setUSDBankAccountStep,
3437
setNonUSDBankAccountStep,
3538
isNonUSDWorkspace,
39+
setShouldShowContinueSetupButton,
3640
}: WorkspaceResetBankAccountModalProps) {
3741
const styles = useThemeStyles();
3842
const {translate} = useLocalize();
@@ -56,12 +60,20 @@ function WorkspaceResetBankAccountModal({
5660
setShouldShowConnectedVerifiedBankAccount(false);
5761
}
5862

63+
if (setShouldShowContinueSetupButton) {
64+
setShouldShowContinueSetupButton(false);
65+
}
66+
5967
if (setNonUSDBankAccountStep) {
6068
setNonUSDBankAccountStep(null);
6169
}
6270
} else {
6371
resetUSDBankAccount(bankAccountID, session, policyID, lastPaymentMethod);
6472

73+
if (setShouldShowContinueSetupButton) {
74+
setShouldShowContinueSetupButton(false);
75+
}
76+
6577
if (setShouldShowConnectedVerifiedBankAccount) {
6678
setShouldShowConnectedVerifiedBankAccount(false);
6779
}

0 commit comments

Comments
 (0)