Clear BANK_ACCOUNT_LIST when resetting bank account#90133
Conversation
…ankAccount When resetting a bank account via "Start over", the BANK_ACCOUNT_LIST entry was not being cleared. This caused the pending bank account row to persist in WorkspaceWorkflowsPage after app restart while offline, since that page checks BANK_ACCOUNT_LIST for entries matching the workspace policyID. Following the existing pattern in deletePaymentBankAccount, this adds BANK_ACCOUNT_LIST updates to optimistic/success/failure data in both resetUSDBankAccount and resetNonUSDBankAccount. Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
@MelvinBot, pull the latest main |
…ntListOnStartOver Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Merged the latest |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppvideo_2026-05-25_12-09-37.mp4video_2026-05-25_12-09-30.mp4Android: mWeb ChromeScreen.Recording.2026-05-25.at.11.13.39.moviOS: HybridAppScreen.Recording.2026-05-25.at.11.54.59.moviOS: mWeb SafariScreen.Recording.2026-05-25.at.11.04.36.movMacOS: Chrome / SafariScreen.Recording.2026-05-25.at.10.56.18.mov |
|
@MelvinBot, mark the bank account as deleted (struck through) if it's pending deletion |
Wrap bank account MenuItem with OfflineWithFeedback passing the bankAccountPendingAction so the row appears struck through while the delete is in flight offline. Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Wrapped the bank account |
@MelvinBot, use the steps above to populate Tests, Offline tests and QA tests in the checklist |
|
Updated the PR body with the provided steps in the Tests, Offline tests, and QA Steps sections. Also checked off the related checklist items for testing steps. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot, implement some unit tests for resetNonUSDBankAccount and resetUSDBankAccount |
Tests verify that BANK_ACCOUNT_LIST is updated correctly during bank account reset: pendingAction set to DELETE optimistically, entry nulled on success, and pendingAction cleared on failure. Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Added unit tests for resetUSDBankAccount:
resetNonUSDBankAccount:
|
@MelvinBot, this worked for web and mWeb, but not for native iOS and Android apps |
OfflineWithFeedback applies textDecorationLine via View style which cascades on web via CSS but is ignored on native RN Views. Pass offlineFeedbackDeleted directly to MenuItem's titleStyle and descriptionTextStyle props so the strikethrough renders on all platforms. Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
The issue is that |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM!
@MelvinBot, mark this as ready for review
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #89895 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Marked this PR as ready for review. |
|
@eVoloshchak 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] |
|
@MelvinBot, check off every checkbox in the PR author checklist |
|
Done — checked off every checkbox in the PR Author Checklist. |
|
🚧 @cead22 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/cead22 in version: 9.3.83-0 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR against the help site articles under No help site changes are required. This PR is a bug fix for offline behavior when resetting a bank account via "Start over" — it adds proper The existing help site articles (e.g., @eVoloshchak, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.83-3 🚀
|
Explanation of Change
When resetting a bank account via "Start over" while offline, the
BANK_ACCOUNT_LISTOnyx entry was never cleared. SinceWorkspaceWorkflowsPagechecksBANK_ACCOUNT_LISTfor entries matching the workspacepolicyID, the pending bank account row persisted across app restarts.This adds
BANK_ACCOUNT_LISTupdates to the optimistic/success/failure data in bothresetUSDBankAccountandresetNonUSDBankAccount, following the existing pattern indeletePaymentBankAccount:pendingAction: DELETEnullto remove itpendingActionto restore the entryFixed Issues
$ #89895
PROPOSAL: #89895 (comment)
Tests
Offline tests
QA Steps
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