Skip to content

[$125] Add bank account - Existing bank account not displayed after workspace currency matches account currency #77626

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: 9.2.78-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #71659
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11, Chrome | iPhone SE 3rd generation, Tahoe 26.1 Chrome | Samsung A15, Android 16, Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to https://staging.new.expensify.com.
  2. Create a workspace with USD currency.
  3. Open the workspace and navigate to Workflows > Add bank account.
  4. Complete the flow to add a business bank account.
  5. Create a new workspace with ARS currency, then go to the workspace chat.
  6. Create an expense, submit it, approve it, and try to pay it using 'Pay with business bank account'.
  7. Change the currency of the workspace from ARS to USD.
  8. Return to the expense and pay it again using 'Pay with business bank account'.

Expected Result:

Bank accounts with mismatched currencies should be hidden, but once the workspace currency matches an existing bank account’s currency, those accounts must appear as payment options.

Actual Result:

Even after changing the workspace currency to match an existing bank account’s currency, the accounts do not appear as payment options.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022000957949561471417
  • Upwork Job ID: 2000957949561471417
  • Last Price Increase: 2026-02-10
  • Automatic offers:
    • etCoderDysto | Contributor | 110319695
Issue OwnerCurrent Issue Owner: @brianlee-expensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 13, 2025
  2. melvin-bot commented on Dec 13, 2025

    @melvin-bot

    Triggered auto assignment to @brianlee-expensify (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. M00rish commented on Dec 14, 2025

    @M00rish
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-12-30 05:09:30 UTC.

    Proposal

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

    Add bank account - Existing bank account not displayed after workspace currency matches account currency

    What is the root cause of that problem?

    current logic does not consider if there are existing bank accounts:

    addBankAccountRoute={isExpenseReport ? ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute(iouReport?.policyID, undefined, Navigation.getActiveRoute()) : undefined}

    const bankAccountRoute = addBankAccountRoute ?? getBankAccountRoute(chatReport);
    Navigation.navigate(bankAccountRoute);

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

    we should do like WorkspaceWorkflowsPage.tsx and update SettlmentButton to check if there existing banks :

    
     const hasValidExistingAccounts = getEligibleExistingBusinessBankAccounts(bankAccountList, currency, true).length > 0;
        let addBankAccountRoute;
    
        if (hasValidExistingAccounts && policy?.id && isExpenseReport) {
            addBankAccountRoute = ROUTES.WORKSPACE_WORKFLOWS_CONNECT_EXISTING_BANK_ACCOUNT.getRoute(policy.id);
        }
    

    and add to SIDEBAR_TO_RHP.ts to make sure we don;t navigate back to workflow page :

        [SCREENS.HOME]: [SCREENS.WORKSPACE.WORKFLOWS_CONNECT_EXISTING_BANK_ACCOUNT],
    

    and in add to WorkspaceWorkflowsConnectExistingBankAccountPage, so we don't navigate back to worfkflow page :

        const topmostReportId = Navigation.getTopmostReportId();
        const isFromReport = !!topmostReportId;
    
    ...
    const handleItemPress = ({methodID, accountData}: PaymentMethodPressHandlerParams) => {
     ....
    
            Navigation.setNavigationActionToMicrotaskQueue(() => {
                if (isFromReport) {
                    Navigation.dismissModal();
                }
    
                if (isBankAccountPartiallySetup(accountData?.state)) {
    ...
    
    

    all details will be discussed in PR.

    PRo.webm

    What alternative solutions did you explore? (Optional)

    if using WorkspaceWorkflowsConnectExistingBankAccountPage is not ideal.

    Option 2:
    create a new compoenent for selection either a popup or RHP modal for user to select the bank account.

    Option 3:
    Navigate to workflow page for bank selection.

  4. changed the title [-]Add bank account - Existing bank account not displayed after workspace currency matches account currency[/-] [+][$250] Add bank account - Existing bank account not displayed after workspace currency matches account currency[/+] on Dec 16, 2025
  5. melvin-bot commented on Dec 16, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 16, 2025
  7. melvin-bot commented on Dec 16, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @truph01 (External)

  8. cosmicvulpes commented on Dec 17, 2025

    @cosmicvulpes
    Contributor

    Proposal

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

    When a user changes their workspace currency to match an existing business bank account's currency, the bank account does not appear as a payment option. Users expect matching bank accounts to become available automatically.

    What is the root cause of that problem?

    The updateGeneralSettings function in src/libs/actions/Policy/Policy.ts updates outputCurrency but does not update policy.achAccount. The SettlementButton component relies on policy.achAccount.bankAccountID to show business bank account payment options - without it being set, no VBBA option appears.

    // src/components/SettlementButton/index.tsx - getLatestBankAccountItem()
    function getLatestBankAccountItem() {
        if (!policy?.achAccount?.bankAccountID) {
            return; // No bank account shown if achAccount is not set
        }
        // ...
    }

    The currency filtering logic in getEligibleExistingBusinessBankAccounts works correctly, but it's only used when manually connecting a bank account via the workflows page, not when currency changes.

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

    Modify updateGeneralSettings in src/libs/actions/Policy/Policy.ts to automatically link an eligible bank account when currency changes:

    1. When currency changes, call getEligibleExistingBusinessBankAccounts to find matching accounts
    2. If one matching account exists → auto-set achAccount.bankAccountID to that account
    3. If multiple matching accounts exist → navigate user to the existing bank account selection page (WORKSPACE_WORKFLOWS_CONNECT_EXISTING_BANK_ACCOUNT)
    4. If no matching accounts and current achAccount currency is now mismatched → clear achAccount
    // In updateGeneralSettings - add logic when currency changes:
    if (isCurrencyChanging) {
        const eligibleBankAccounts = getEligibleExistingBusinessBankAccounts(bankAccountList, currency, false);
    
        if (eligibleBankAccounts.length === 1) {
            // Auto-connect the single matching account
            achAccountUpdate = {
                bankAccountID: eligibleBankAccounts[0].accountData?.bankAccountID,
                reimburser: policy?.achAccount?.reimburser ?? policy?.owner,
            };
        } else if (eligibleBankAccounts.length > 1) {
            // Flag for caller to navigate to selection page
            shouldNavigateToSelectBankAccount = true;
        }
        // Include achAccountUpdate in optimisticData
    }

    The caller (WorkspaceOverviewCurrencyPage) would handle navigation when multiple accounts are available:

    // In WorkspaceOverviewCurrencyPage - onSelectCurrency:
    const result = updateGeneralSettings(policy.id, policy?.name ?? '', item.currencyCode, bankAccountList);
    if (result?.shouldNavigateToSelectBankAccount) {
        Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_CONNECT_EXISTING_BANK_ACCOUNT.getRoute(policy.id));
        return;
    }

    What alternative solutions did you explore? (Optional)

    Navigate to selection page after every currency change: Always route users to WORKSPACE_WORKFLOWS_CONNECT_EXISTING_BANK_ACCOUNT when eligible accounts exist. Simpler but requires an extra step even when only one account matches.

  9. melvin-bot commented on Dec 20, 2025

    @melvin-bot

    @truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. 52 remaining items

  11. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 2, 2026
  12. melvin-bot commented on Feb 2, 2026

    @melvin-bot

    📣 @etCoderDysto 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  13. etCoderDysto commented on Feb 7, 2026

    @etCoderDysto
    Contributor

    @truph01 the issue is fixed by this PR #79343. Can you please ask for retest?

    const canLinkExistingBusinessBankAccount = getEligibleExistingBusinessBankAccounts(bankAccountList, policy?.outputCurrency, true).length > 0;

  14. brianlee-expensify commented on Feb 10, 2026

    @brianlee-expensify
    Contributor

    @etCoderDysto requesting a retest now

  15. m-natarajan commented on Feb 10, 2026

    @m-natarajan

    Issue is not reproducible on Windows 11 / Chrome, Xiaomi Poco F5 / Android 13, iPhone 7 Plus / iOS 15.8.3 in v9.3.15-10

    bandicam.2026-02-10.11-07-07-165.mp4
    77626_Android-Not.repro.mp4
    77626_Not.repro.mp4
  16. brianlee-expensify commented on Feb 10, 2026

    @brianlee-expensify
    Contributor

    @etCoderDysto appreciate the callout for the other PR.

    given that you were already hired and @truph01 reviewed your proposal when the other PR was already in motion, the payment for this GH will be $125 instead of $250 (based on the C+ Process Doc: see Step 17b)

    If we decide to close the job before it is successfully completed:
    50% payment to contributor and C+ if the contributor was hired/assigned.

  17. changed the title [-][$250] Add bank account - Existing bank account not displayed after workspace currency matches account currency[/-] [+][$125] Add bank account - Existing bank account not displayed after workspace currency matches account currency[/+] on Feb 10, 2026
  18. melvin-bot commented on Feb 10, 2026

    @melvin-bot

    Upwork job price has been updated to $125

  19. brianlee-expensify commented on Feb 10, 2026

    @brianlee-expensify
    Contributor

    Payment Summary

    Contributor: @etCoderDysto paid $125 via Upwork
    Contributor+: @truph01 due $125 via NewDot

  20. garrettmknight commented on May 10, 2026

    @garrettmknight
    Contributor

    $125 approved for @truph01

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions