From cfdf2c4e1a437b4144ef3180cee9edfce9242995 Mon Sep 17 00:00:00 2001 From: Nabi Ebrahimi Date: Sat, 11 Apr 2026 12:30:15 +0430 Subject: [PATCH] fix: prevent "Not here" page opening in background when selecting Pay with Business BA in offline mode --- src/components/KYCWall/BaseKYCWall.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/KYCWall/BaseKYCWall.tsx b/src/components/KYCWall/BaseKYCWall.tsx index 264dda7b64db..af140670d2b8 100644 --- a/src/components/KYCWall/BaseKYCWall.tsx +++ b/src/components/KYCWall/BaseKYCWall.tsx @@ -171,7 +171,7 @@ function KYCWall({ } const lastWorkspaceNumber = lastWorkspaceNumberSelector(policies, currentUserEmail); - const {policyID, workspaceChatReportID, reportPreviewReportActionID, adminsChatReportID} = + const {policyID, workspaceChatReportID, adminsChatReportID} = createWorkspaceFromIOUPayment( iouReport, reportPreviewAction, @@ -187,12 +187,11 @@ function KYCWall({ savePreferredPaymentMethod(iouReport.policyID, policyID, CONST.LAST_PAYMENT_METHOD.IOU, lastPaymentMethod?.[iouReport?.policyID]); } completePaymentOnboarding(CONST.PAYMENT_SELECTED.BBA, introSelected, isSelfTourViewed, betas, adminsChatReportID, policyID); - if (workspaceChatReportID) { - Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID, reportPreviewReportActionID)); - } + const workspaceReportRoute = workspaceChatReportID ? ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID) : undefined; - // Navigate to the bank account set up flow for this specific policy - Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute({policyID})); + setNavigationActionToMicrotaskQueue(() => { + Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute({policyID, backTo: workspaceReportRoute})); + }); return; }