Skip to content

Wallet - Default label is only shown after refreshing page when deleting default account #54748

Closed

Description

@IuliiaHerets

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.0.80-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #52322
Email or phone of affected tester (no customers): applausetester+394034@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: User Settings

Action Performed:

Precondition:

  • Account has three personal bank accounts.
  1. Go to staging.new.expensify.com
  2. Go to Account settings > Wallet.
  3. Click on the default bank account.
  4. Click Delete.
  5. Delete the default bank account.
  6. Note that there is no Default badge on the most recently added bank account.
  7. Refresh the page.

Expected Result:

The most recently added bank account will be set as default. (according to this doc https://docs.google.com/document/d/1H1hMnTcMrR8MT6BXz3fCE99eVIurgrHDtaxIH5aW8Ug/edit?tab=t.0)

Actual Result:

The Default badge is only added to the new default bank account after the page is refreshed.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6704996_1735809140259.20250102_163826.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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. Shahidullah-Muffakir commented on Jan 2, 2025

    @Shahidullah-Muffakir
    Contributor

    This requires changes on the backend. When a user deletes their default payment method with (DeletePaymentBankAccount) , the frontend doesn’t know which payment method should become the new default. Currently, the backend only returns a payment method marked as isDefault: true after the page is refreshed, which updates userWallet?.walletLinkedAccountID to the new default payment method.

    To avoid requiring a page refresh, the backend should update userWallet?.walletLinkedAccountID in the same API (DeletePaymentBankAccount) response when a payment method is deleted, assigning a new default payment method directly.

    In summary, when the DeletePaymentBankAccount endpoint is called, the response should include userWallet?.walletLinkedAccountID. This is essential becauseuserWallet?.walletLinkedAccountIDis used to display the default badge on the wallet page.

  4. bfitzexpensify commented on Jan 2, 2025

    @bfitzexpensify
    Contributor

    I think the precondition of Account has three personal bank accounts. is very rare, and this is just a display issue that's resolved upon refreshing. Closing this out.

  5. izarutskaya commented on Jul 29, 2025

    @izarutskaya

    Reproduce in Web using build v9.1.87-0
    mac/chrome

    Screen.Recording.2025-07-29.at.3.05.46.in.the.afternoon.mp4
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.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions