Skip to content

[Awaiting checklist] [Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page #63123

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.1.54-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: n/a
Email or phone of affected tester (no customers): expensifail account
Issue reported by: Applause Internal Team
Device used: Mac 15.4.1/Safari and Desktop, iPhone 13 iOS 18.4.1/Safari
App Component: Workspace Settings

Action Performed:

  1. Navigate to https://staging.new.expensify.com
  2. Log in with expensifail account
  3. Navigate to the add bank account modal in Workspace settings
  4. Click/tap on connect online
    5.Select Regions bank
    6.Enter the test credentials
    7.In the success modal click the Back button

Expected Result:

The bank account is displayed in workspace settings as added

Actual Result:

In the bank account success modal, the back button navigates to the default currency page, and after clicking the Back button one more time, the RHP closes. The bank account appears only after refreshing the page.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021929473706969513897
  • Upwork Job ID: 1929473706969513897
  • Last Price Increase: 2025-06-02
  • Automatic offers:
    • mkzie2 | Contributor | 107586541
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

  1. added
    Daily
    Bug
    on May 30, 2025
  2. melvin-bot commented on May 30, 2025

    @melvin-bot

    Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. mkzie2 commented on May 30, 2025

    @mkzie2
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In the bank account success modal, the back button navigates to the default currency page, and after clicking the Back button one more time, the RHP closes. The bank account appears only after refreshing the page.

    What is the root cause of that problem?

    1. In the success modal, clicking the back button will call Navigation.goBack(), which will take us to the previous page. If we need to select the currency before starting the bank account flow, the navigation stack in RHP at the time we're in the success modal is WorkspaceOverviewCurrencyPage --> ReimbursementAccountPage. That is the reason we go back to the currency page.

    The bank account appears only after refreshing the page.

    1. For this problem, it's a known issue here

    What changes do you think we should make in order to solve the problem?

    We should call Navigation.dismissModal here instead, which will close all RHP pages.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. hungvu193 commented on May 30, 2025

    @hungvu193
    Contributor
  5. MobileMage commented on May 30, 2025

    @MobileMage
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In the bank account success modal, the back button incorrectly navigates to the default currency page instead of showing the bank account in workspace settings. When a user adds a bank account in workspace settings and clicks the back button in the success modal, they are taken to an unrelated screen rather than seeing their newly added bank account.

    What is the root cause of that problem?

    The root cause is in the exitFlow function in AddPersonalBankAccountPage.tsx. This function handles navigation when exiting the bank account flow, but it doesn't have a specific case for when a bank account is added within a workspace context. The function only checks for an exitReportID or onSuccessFallbackRoute, but doesn't properly handle the case where a policy ID is present but neither of those values are set.

    What changes do you think we should make in order to solve the problem?

    We should add a specific condition to the exitFlow function to handle workspace bank accounts differently. If the bank account is associated with a policy (has a policyID), we should use Navigation.dismissModal() instead of the generic goBack() function. This will ensure that the user returns directly to the workspace settings where they'll see their newly added bank account.

    if (exitReportID) {
        Navigation.dismissModalWithReport({reportID: exitReportID});
    } else if (shouldContinue && onSuccessFallbackRoute) {
        continueSetup(onSuccessFallbackRoute);
    } else if (personalBankAccount?.policyID) {
        // For workspace bank accounts, go back to the workspace settings
        Navigation.dismissModal();
    } else {
        goBack();
    }
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We should test navigation from the bank account success modal in the workspace context to ensure it correctly returns to the workspace settings page.

    What alternative solutions did you explore? (Optional)

    N/A

  6. MrMuzyk commented on May 30, 2025

    @MrMuzyk
    Contributor

    @hungvu193 I don't think this is a regression from our work but idea to replace goBack with dismissModal in this particular case seems like the easiest solution. Do you want me to take this over?

  7. added
    External
    on Jun 2, 2025
  8. changed the title [-]Bank account - In the success modal, the back button navigates to the default currency page[/-] [+][$250] Bank account - In the success modal, the back button navigates to the default currency page[/+] on Jun 2, 2025
  9. melvin-bot commented on Jun 2, 2025

    @melvin-bot
  10. added
    Help Wanted
    on Jun 2, 2025
  11. 25 remaining items

  12. garrettmknight commented on Jun 25, 2025

    @garrettmknight
    Contributor

    Payment summary:

  13. changed the title [-][Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/-] [+][Awaiting checklist] [Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/+] on Jun 25, 2025
  14. melvin-bot commented on Jul 1, 2025

    @melvin-bot

    @garrettmknight Eep! 4 days overdue now. Issues have feelings too...

  15. shubham1206agra commented on Jul 1, 2025

    @shubham1206agra
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/57460/files#r2177864882

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: Not Required

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • The WS currency is not a supported bank account currency

    Test:

    1. Go WS settings > Workflows > Connect bank account > Update currency
    2. Change the currency to USD
    3. Complete bank account flow
    4. In the bank success modal, click on the back button
    5. Verify that the modal is dismissed

    Do we agree 👍 or 👎

  16. garrettmknight commented on Jul 2, 2025

    @garrettmknight
    Contributor

    Thanks, request when ready!

  17. JmillsExpensify commented on Jul 21, 2025

    @JmillsExpensify
    Contributor

    Payment summary:

  18. garrettmknight commented on Jul 22, 2025

    @garrettmknight
    Contributor

    $250 approved for @shubham1206agra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions