Repository navigation
Fix: Hide Share button for deposit accounts and clear persistent error dot - #90557
Conversation
The Share button was shown for all OPEN BUSINESS bank accounts, but only withdrawal accounts (allowDebit=true) can actually be shared. Deposit-only accounts triggered a backend rejection when shared. Adding the allowDebit check prevents the error from occurring. Co-authored-by: Cursor <cursoragent@cursor.com>
clearShareBankAccountErrors only cleared SHARE_BANK_ACCOUNT errors but the PHP layer sets errors on BANK_ACCOUNT_LIST, causing a persistent error dot on the wallet page. Now clears both keys, matching the existing clearUnshareBankAccountErrors pattern. Also clears errors on unmount so navigating away after a failure removes stale error state. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@suneox let us know how it goes |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
I'll take a look at this one in an hour |
This comment has been minimized.
This comment has been minimized.
|
@fedirjh, could you please take another look at the BE? On my account, allowDebit is true, but after ShareBankAccount successful, accountData.sharees is still empty. Additionally, re-sharing with the previous user still returns an error until the shared account is removed. CleanShot.2026-05-14.at.18.47.05.1.mp4 |
|
@suneox As explained in this comment. We don't return |
Got it, I'll verify this by disabling the share and clearing the error |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Nice, fix makes sense 👍
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppaz_recorder_20260515_000630.1.mp4Android: mWeb ChromeCleanShot.2026-05-14.at.23.12.21.3.mp4iOS: HybridAppCleanShot.2026-05-14.at.23.21.27.5.mp4iOS: mWeb SafariCleanShot.2026-05-14.at.23.12.21.mp4MacOS: Chrome / SafariCleanShot.2026-05-14.at.23.15.00.4.mp4CleanShot.2026-05-14.at.22.36.16.2.mp4 |
|
Currently, I only have a test accounts and am unable to set up a real business account. Therefore, I can only verify the logic for clearing errors on successful shares and mocking the allowDebit disable state. @fedirjh Since the current Test and QA steps do not mention the requirement for real accounts or specific allowDebit configurations for Savings/Checking accounts so I think should update this section for QA verify |
|
@suneox Updated QA steps to mention the requirements. |
|
🚧 @mountiny 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/mountiny in version: 9.3.74-7 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR and found that the help site article Share a Business Bank Account ( Changes made:
Draft PR: #90809 |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|
|
Hi @fedirjh. How QA team can create bank account with allowDebit=false and true? |
@IuliiaHerets I've verified this by manually updating the
|
|
@suneox I am not sure if QA team can do it. |
This update is purely to ensure consistency with the BE logic. As a result, I could only verify that the error disappears after closing the sharing page, and manually mock the disabled share button by grabbing the Onyx.get('bankAccountList').then(rs => console.log(Object.keys(rs)));
// then run replace your card id
Onyx.merge('bankAccountList', {your_card_id: {accountData: {allowDebit:false}}});@fedirjh Any tips on how to set up a real bank account data with allowDebit set to false? or it should ignore verify that case |
|
@IuliiaHerets Can you also just execute the test steps from here #87411 |
|
@mountiny PR was passed using QA steps from the original issue. |
Explanation of Change
Two issues cause the "share bank account" error and persistent error dot on the wallet page:
Fixed Issues
$ #87411
PROPOSAL: #87411 (comment)
Tests
Offline tests
N/A
QA Steps
Prerequisite:
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