Skip to content

Commit c77ed49

Browse files
authored
Merge pull request Expensify#87690 from nabi-ebrahimi/fix/offline-business-ba-not-here-background
Fix "Not here" page opening in background for Business BA payments in offline mode
2 parents 63c4076 + cfdf2c4 commit c77ed49

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/components/KYCWall/BaseKYCWall.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function KYCWall({
171171
}
172172

173173
const lastWorkspaceNumber = lastWorkspaceNumberSelector(policies, currentUserEmail);
174-
const {policyID, workspaceChatReportID, reportPreviewReportActionID, adminsChatReportID} =
174+
const {policyID, workspaceChatReportID, adminsChatReportID} =
175175
createWorkspaceFromIOUPayment(
176176
iouReport,
177177
reportPreviewAction,
@@ -188,12 +188,11 @@ function KYCWall({
188188
savePreferredPaymentMethod(iouReport.policyID, policyID, CONST.LAST_PAYMENT_METHOD.IOU, lastPaymentMethod?.[iouReport?.policyID]);
189189
}
190190
completePaymentOnboarding(CONST.PAYMENT_SELECTED.BBA, introSelected, isSelfTourViewed, betas, adminsChatReportID, policyID);
191-
if (workspaceChatReportID) {
192-
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID, reportPreviewReportActionID));
193-
}
191+
const workspaceReportRoute = workspaceChatReportID ? ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID) : undefined;
194192

195-
// Navigate to the bank account set up flow for this specific policy
196-
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute({policyID}));
193+
setNavigationActionToMicrotaskQueue(() => {
194+
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute({policyID, backTo: workspaceReportRoute}));
195+
});
197196
return;
198197
}
199198

0 commit comments

Comments
 (0)