App icon indicating copy to clipboard operation
App copied to clipboard

[$175] Bank account - No email with Expensifail account after adding non-US deposit bank account

Open applause-bot[bot] opened this issue 1 week ago • 6 comments

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.5.53-2 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/test-runs/176699133/folder/57527124/41236749/4907840512?sort=%2Bidentifier Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Windows 10/Chrome App Component: User Settings

Action Performed:

  1. Open the New Dot app
  2. Log in to NewDot with a new Expensifail account
  3. Go to Settings > Wallet
  4. Click Add bank account
  5. Follow the steps in TC to add a non-US deposit bank account

Expected Result:

  1. Verify you received an email indicating you added a new deposit account.
  2. Verify the subject is Did you add a new bank account in Expensify?

Actual Result:

No email after adding the bank account

Workaround:

Unknown

Platforms:

  • [x] Android: App
  • [ ] Android: mWeb Chrome
  • [x] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [ ] MacOS: Chrome Safari

Screenshots/Videos

https://github.com/user-attachments/assets/e7524419-88d9-4c08-a390-395c55253c4b

View all open jobs on GitHub

Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7323821

Upwork Automation - Do Not Edit

applause-bot[bot] avatar Nov 25 '26 12:11 applause-bot[bot]

While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/847668fea377f767f1d0901969e7a82b4348d95a14513a3cd8096cc415a252ca

applause-bot[bot] avatar Nov 25 '26 12:11 applause-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

Job added to Upwork: https://www.upwork.com/jobs/~022125575777627035608

⚠️ Preliminary analysis (low confidence) — the missing email is reported, but its root cause is not confirmed.

Findings

The expected email is “Did you add a new bank account in Expensify?” after adding a non-US deposit account through Wallet.

The inspected App code does not establish a frontend omission:

  • The default international flow submits a deposit-account creation request and advances on API success.
  • A Wise-enabled alternative uses a different creation request.
  • Neither the international nor US flow makes a separate notification request. Adding one without confirming backend behavior would be premature.
Public code evidence

What remains unverified

No production queries could run because log access was unavailable. Consequently, this investigation cannot distinguish unsuccessful account creation from a missing, suppressed, delayed, or undelivered notification. Test-domain suppression is only an alternative hypothesis—not a finding.

Recommended next step

An internal engineer should correlate the tester’s account-creation request with notification and delivery records, confirming:

  1. Which provider handled creation and whether it succeeded.
  2. Whether the security email was generated or suppressed.
  3. Whether delivery succeeded.

This appears to require a backend/internal investigation. No App code fix is justified by the evidence currently available.


Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.


view run

MelvinBot avatar Nov 25 '26 13:11 MelvinBot

Proposal

Please re-state the problem that we are trying to solve in this issue.

After adding a non-US deposit bank account (Settings > Wallet > Add bank account, international flow), the user never receives the "Did you add a new bank account in Expensify?" security email. The account itself is created successfully; only the notification email is missing. Reproduced in staging and production on v9.5.53-2 (Applause regression TC).

What is the root cause of that problem?

The email is a server-sent notification, and no App code path requests it — I verified src/libs/actions/BankAccounts.ts (2,215 lines): none of the bank-account creation actions (Plaid, manual US, collect-only, Wise, Corpay) makes a separate email/notification request, so the email must be triggered by the backend handler of the creation command.

The international deposit flow in the Wallet now routes essentially every non-US country through the Corpay flow:

  • src/pages/settings/Wallet/InternationalDepositAccount/subPages/CountrySelection.tsx calls fetchCorpayFields(selectedCountry) for every country not in CONST.CORPAY_FIELDS.EXCLUDED_COUNTRIES;
  • Confirmation (.../subPages/Confirmation.tsx:64) submits via createCorpayBankAccountForWalletFlow(...) in src/libs/actions/BankAccounts.ts:1804, which sends a single API.write(WRITE_COMMANDS.BANK_ACCOUNT_CREATE_CORPAY, {isWithdrawal: false, isSavings: true, inputs: JSON.stringify({...data, setupType: 'manual', fieldsType: 'international', country, currency})}).

So a non-US deposit account is now created exclusively through the BankAccount_CreateCorpay backend handler, while the older paths (US ADD_PERSONAL_BANK_ACCOUNT, collect-only CREATE_COLLECT_ONLY_DEPOSIT_ACCOUNT) go through handlers that do send the email. The most likely root cause is that the Corpay creation handler was never wired to send the "Did you add a new bank account in Expensify?" notification — which is why the account is created fine but the email never arrives. The timing fits: the Corpay flow and this creation function are recent work (reworked in early/mid-November; commit b23fe0f2 on 2026-11-14 touched exactly this function).

What changes do you think we should make in order to solve the problem?

  1. In the backend handler for BankAccount_CreateCorpay, send the "Did you add a new bank account in Expensify?" email after the deposit account is created successfully, mirroring the notification sent by the other bank-account creation handlers (US personal / collect-only deposit account).
  2. If the team's convention is that the App must request the notification explicitly, add that trigger to createCorpayBankAccountForWalletFlow instead — but per the App code I inspected, no creation path requests the email from the App, so the server-side handler is the consistent place for the fix.
  3. Regression-test coverage: extend tests/unit/BankAccountsTest.ts (which already has a createCorpayBankAccountForWalletFlow describe block) to assert the creation request goes out with the expected parameters, and add a QA step to the Applause TC verifying the email is received after adding a non-US deposit account.

What alternative solutions did you explore? (Optional)

  • Adding a separate email/notification request from the App: rejected — no other creation flow does this, and it would duplicate a server responsibility and risk double emails for the paths that already notify.
  • Reusing the collect-only path for non-US accounts: rejected — the Corpay flow is the intended international path (country-based field collection), so the fix belongs in the Corpay handler, not in routing users back to the old flow.

QA steps (to verify the fix)

  1. On staging, log in with a fresh Expensifail account, go to Settings > Wallet > Add bank account, add a non-US deposit bank account (Corpay flow).
  2. Verify the "Did you add a new bank account in Expensify?" email arrives in the account inbox.
  3. Repeat for a US bank account (Plaid/manual) and confirm the email still arrives exactly once (no duplicate after the change).
  4. Verify the account appears in Wallet with the correct details and the success screen shows.

letiggo avatar Nov 25 '26 21:11 letiggo

@getusha Eep! 4 days overdue now. Issues have feelings too...