Clear stale reimbursement account data on Wallet bank account setup#84773
Conversation
…unt setup When entering the Wallet's bank account flow, stale achData from a previously viewed workspace bank account persists in REIMBURSEMENT_ACCOUNT. The Wallet CountrySelection page only cleared the draft but not the main account data, causing the "Business bank account added" screen to appear instead of the bank connection options. Call clearReimbursementAccount() before navigation to reset achData to DEFAULT_DATA. Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
|
@MelvinBot Mark this as ready for review. |
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Done! This PR has been marked as ready for review. 🚀 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-15.at.6.42.23.PM.movAndroid: mWeb ChromeScreen.Recording.2026-03-15.at.6.41.41.PM.moviOS: HybridAppScreen.Recording.2026-03-15.at.6.44.23.PM.moviOS: mWeb SafariScreen.Recording.2026-03-15.at.6.43.46.PM.movMacOS: Chrome / SafariScreen.Recording.2026-03-15.at.6.37.19.PM.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #82763 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 @MarioExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.3.39-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.39-3 🚀
|
Explanation of Change
When a user who already has a bank account on a workspace navigates through Wallet → Add bank account → Make payments → selects a non-USD country → clicks Next, they see the "Business bank account added" confirmation screen instead of the expected bank connection options.
The root cause is that stale
achDatafrom a previously viewed workspace bank account persists in theREIMBURSEMENT_ACCOUNTOnyx key. The Wallet'sCountrySelectionpage only calledclearReimbursementAccountDraft()but did not callclearReimbursementAccount(), so stale data (withstate: 'OPEN') was used byReimbursementAccountPageto incorrectly show the "bank account added" screen.This PR adds a
clearReimbursementAccount()call inCountrySelection.onConfirm()before navigation, which resetsachDatatoDEFAULT_DATA(withstate: 'SETUP') so that the fresh setup flow renders correctly.Fixed Issues
$ #82763
PROPOSAL: #82763 (comment)
Tests
Offline tests
N/A — This flow requires network connectivity to reach the bank account setup pages.
QA Steps
Same as Tests above.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari