Repository navigation
Description
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: v9.3.77-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: https://test-management.browserstack.com/projects/2219752/folder/13176890/test-cases/41237377
Email or phone of affected tester (no customers): -
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Ventura / Chrome
App Component: Other
Action Performed:
Precondition: workspace with enabled Exopensify feature. Add BA via Expensify card tab.
- After Bank Account added, go to Expensify card
- Click on Issue new card
- On Choose bank account tab, click on bank account
Expected Result:
"Verifying" page with animation displayed.
"Bank account verified" message displayed with animation after a moment
Actual Result:
"Verifying" page with animation displayed.
User returned to Choose bank account tab.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Video.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022056714817912528335
- Upwork Job ID: 2056714817912528335
- Last Price Increase: 2026-06-16
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
MelvinBot commentedon May 19, 2026
Proposal
What is the root cause of that problem?
There is an Onyx key mismatch between where the bank account verification metadata is written and where it is read.
When a user clicks a bank account,
configureExpensifyCardsForPolicywritesisLoading/isSuccessto the Onyx keyEXPENSIFY_CARD_BANK_ACCOUNT_METADATA_{workspaceAccountID}.However,
WorkspaceExpensifyCardBankAccountsreads fromEXPENSIFY_CARD_BANK_ACCOUNT_METADATA_{defaultFundID}, wheredefaultFundIDcomes from theuseDefaultFundIDhook. This hook preferslastSelectedExpensifyCardFeedordomainFundIDoverworkspaceAccountID.When
defaultFundID !== workspaceAccountID(e.g. when a workspace already has a card feed or domain fund configured), the component never sees theisLoading/isSuccessstates. ThegetVerificationState()function returns an empty string, soBankAccountVerificationViewrenders its children (the bank account list) instead of the "Verifying" or "Bank account verified" animations.What changes do you think we should make in order to solve the problem?
In
WorkspaceExpensifyCardBankAccounts.tsx, the Onyx read forcardBankAccountMetadatashould useworkspaceAccountID(frompolicy?.workspaceAccountID) instead ofdefaultFundID, to match the key used by the write side inconfigureExpensifyCardsForPolicy. This aligns the read key with the write key atCard.ts:1350.What alternative solutions did you explore? (Optional)
An alternative would be to change the write side (
configureExpensifyCardsForPolicy) to usedefaultFundIDinstead ofworkspaceAccountID. However, the write side intentionally usesworkspaceAccountID(the value it already receives as a parameter), and the metadata is conceptually about the workspace account being configured — so fixing the read side is the more correct approach.Investigation details
Write side (
Card.ts:1335-1404):configureExpensifyCardsForPolicyalways writes toEXPENSIFY_CARD_BANK_ACCOUNT_METADATA_{workspaceAccountID}for optimistic, success, and failure data.Read side (
WorkspaceExpensifyCardBankAccounts.tsx:48): Reads fromEXPENSIFY_CARD_BANK_ACCOUNT_METADATA_{defaultFundID}.useDefaultFundIDhook (useDefaultFundID.ts:59-65): ReturnslastSelectedExpensifyCardFeed(if exists with a validpaymentBankAccountID) >domainFundID>workspaceAccountID. For workspaces with an existing card feed,defaultFundIDwill differ fromworkspaceAccountID.Flow when keys mismatch:
handleSelectBankAccount→configureExpensifyCardsForPolicy(policyID, workspaceAccountID, bankAccountID)isLoading: trueon key..._{workspaceAccountID}..._{defaultFundID}→ getsundefined→getVerificationState()returns''BankAccountVerificationViewwith emptyverificationStaterenders children (bank account list)Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.yusufdeveloper2903 commentedon May 19, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-05-19 12:37:30 UTC.
Proposal
What is the root cause of that problem?
The verification screen reads and writes the bank-account metadata under different Onyx keys, so the optimistic / success update never reaches the view.
onPresscallsconfigureExpensifyCardsForPolicy(policyID, policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID, value), which writes the optimistic and success merges to${EXPENSIFY_CARD_BANK_ACCOUNT_METADATA}${workspaceAccountID}(keyed by the policy'sworkspaceAccountID) —App/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx
Lines 76 to 78 in 40223f2
App/src/libs/actions/Card.ts
Lines 1335 to 1404 in 40223f2
useOnyx(${EXPENSIFY_CARD_BANK_ACCOUNT_METADATA}${defaultFundID})— keyed byuseDefaultFundID(policyID)—App/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx
Lines 46 to 48 in 40223f2
useDefaultFundIDresolves tolastSelectedExpensifyCardFeed→domainFundID→workspaceAccountID→CONST.DEFAULT_NUMBER_ID—App/src/hooks/useDefaultFundID.ts
Lines 20 to 72 in 40223f2
defaultFundIDis the feed's fund ID, notpolicy.workspaceAccountID.Concretely: tapping the bank account writes
isLoading: truethenisSuccess: trueto…METADATA<workspaceAccountID>, while the view is subscribed to…METADATA<defaultFundID>. Neither merge is observed,getVerificationState()stays'', andBankAccountVerificationViewrenders itschildren(the bank list) instead of the verifying/verified blocking views —App/src/components/BankAccountVerificationView.tsx
Lines 32 to 102 in 40223f2
…PRIVATE_EXPENSIFY_CARD_SETTINGS<defaultFundID>.isLoadingflip that PRs touching the issue-new-card flow already drive elsewhere; the success state for THIS screen never lands.This is a leftover from #71076 (commit
40ed0a4, merged 2025-09-26 — "Use correct workspace ID for any type of the feeds for Expensify card"). That PR migrated the read in this file fromuseWorkspaceAccountID→useDefaultFundIDbecause "for domain feeds workspaceAccountId is equal 0", but it did not update the write path —handleSelectBankAccountstill passespolicy?.workspaceAccountIDto the action. The two sides have been out of sync since.What changes do you think we should make in order to solve the problem?
Pass the same ID the view subscribes to (
defaultFundID) into the action, so optimistic / success merges land on the keyuseOnyxis reading:const handleSelectBankAccount = (value?: number) => { - configureExpensifyCardsForPolicy(policyID, policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID, value); + configureExpensifyCardsForPolicy(policyID, defaultFundID, value); };useDefaultFundIDalready falls back toCONST.DEFAULT_NUMBER_IDwhen nothing resolves, so the existing guard semantics are preserved. The action body is unchanged — both writes (PRIVATE_EXPENSIFY_CARD_SETTINGSandEXPENSIFY_CARD_BANK_ACCOUNT_METADATA) now go to the same fund ID as every other read in this screen and the rest of the Expensify-Card pages that #71076 migrated. The bank list closes, the "Verifying" animation transitions to the "Bank account verified" Fireworks blocking view, and the user can continue to "Issue new card".What alternative solutions did you explore? (Optional)
workspaceAccountIDinstead ofdefaultFundID. Re-introduces Use correct workspace ID for any type of the feeds for Expensify card #71076's original bug for domain feeds (Settlement button missing, settings/cards-list mis-keyed whenpolicy.workspaceAccountID === 0).defaultFundIDinsideconfigureExpensifyCardsForPolicy. Couples a pure write action to feed-selection state (lastSelectedExpensifyCardFeed,PRIVATE_EXPENSIFY_CARD_SETTINGStraversal) it shouldn't read; the call site already has the resolved value.isLoading: trueon whichever key isn't the live one — masks future drifts like this.melvin-bot commentedon May 19, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Pujan92 (
External)[-]Bank account - Can't complete bank account verification[/-][+][$250] Bank account - Can't complete bank account verification[/+]melvin-bot commentedon May 19, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022056714817912528335
melvin-bot commentedon May 19, 2026
📣 @Marshall7777! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
github-actions commentedon May 19, 2026
aswin-s commentedon May 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Web (Chrome/Safari), after adding a bank account through the Expensify Card tab and selecting it on the "Choose bank account" screen, the user briefly sees the "Verifying" animation but is then returned to the "Choose bank account" list instead of seeing the "Bank account verified" success screen. The expected behavior is that, once the backend confirms verification, the success screen with the "Bank account verified" message and animation should be displayed.
What is the root cause of that problem?
In
src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx:48,cardBankAccountMetadatais read from${ONYXKEYS.COLLECTION.EXPENSIFY_CARD_BANK_ACCOUNT_METADATA}${defaultFundID}, butconfigureExpensifyCardsForPolicywrites that metadata under${...}${workspaceAccountID}(src/libs/actions/Card.ts:1350). When a policy already has a previously selected card feed,useDefaultFundID(src/hooks/useDefaultFundID.ts:59-65) returnslastSelectedExpensifyCardFeed/domainFundIDinstead ofworkspaceAccountID, so the page subscribes to a different Onyx key than the one the action mutates.cardBankAccountMetadata?.isLoadingand?.isSuccesstherefore stay falsy,getVerificationState()(line 51) returns'', andBankAccountVerificationViewfalls through to renderchildren(the bank-choice list) instead of the Loading/Verified screens.What changes do you think we should make in order to solve the problem?
src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx:48, subscribe to${ONYXKEYS.COLLECTION.EXPENSIFY_CARD_BANK_ACCOUNT_METADATA}${policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID}so the reader matches the writer inconfigureExpensifyCardsForPolicy.useDefaultFundIDfor resolving an existing card feed for other reads on this page, but do not use it to key the verification metadata, since that metadata is always written underworkspaceAccountIDatsrc/libs/actions/Card.ts:1350(and1387for failure).handleSelectBankAccount(WorkspaceExpensifyCardBankAccounts.tsx:76-78) keeps passingpolicy?.workspaceAccountIDtoconfigureExpensifyCardsForPolicyso reader and writer share the same key.EXPENSIFY_CARD_BANK_ACCOUNT_METADATA(e.g.,DynamicReconciliationAccountSettingsPage.tsx) and align them onworkspaceAccountIDif they share the verification flow.lastSelectedExpensifyCardFeedset to a feed whose fund ID ≠workspaceAccountID, and confirm "Verifying" → "Bank account verified" screen appears.What alternative solutions did you explore? (Optional)
Alternatively, change
configureExpensifyCardsForPolicyto also write the metadata under the resolvedfundID, but that requires the action to know about the same fund-resolution logic and would still break for any other reader keyed onworkspaceAccountID; aligning the reader is the smaller, safer change.kamronbek04 commentedon May 19, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
30 remaining items
Pujan92 commentedon Jun 7, 2026
@MelvinBot This can be closed based on testing team confirmation #91077 (comment)
MelvinBot commentedon Jun 7, 2026
🤖 Closing this issue per
Pujan92's request. The testing team confirmed it is no longer reproducible in build v9.3.99-7.melvin-bot commentedon Jun 9, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Jun 10, 2026
@Pujan92 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jun 12, 2026
@Pujan92 Eep! 4 days overdue now. Issues have feelings too...
mvtglobally commentedon Jun 13, 2026
Issue not reproducible during KI retests. (First week)
melvin-bot commentedon Jun 16, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Pujan92 commentedon Jun 16, 2026
@MelvinBot check #91077 (comment)
MelvinBot commentedon Jun 16, 2026
🤖 Good catch — that earlier comment said the issue was being closed, but it actually stayed open, which is why the overdue/weekly reminders kept firing. Closing it now per your request, since the testing team confirmed it's no longer reproducible in v9.3.99-7 and again during KI retests.
melvin-bot commentedon Jun 16, 2026
@Pujan92 this issue is now 4 weeks old, please consider:
Thanks!