Skip to content

[$250] [VBBA] connectBankAccountWithPlaid can send bankAccountID as NaN after verify-account resume flow #85747

@c3024

Description

@c3024

Problem

In the USD reimbursement bank account flow, the CONNECT_BANK_ACCOUNT_WITH_PLAID request can be sent with bankAccountID=NaN.

Reproduction

  1. Use an account where account.validated is false.
  2. Go to workspace bank account setup.
  3. Choose Connect online with Plaid.
  4. App redirects to verify account (ROUTES.BANK_ACCOUNT_VERIFY_ACCOUNT.getRoute(policyID, backTo)).
  5. Complete validation and return to the reimbursement flow.
  6. Complete Plaid auth, select a bank account (Savings/Checking), and continue (quick click on Next makes this easier to hit).
  7. Inspect the API payload for CONNECT_BANK_ACCOUNT_WITH_PLAID:
    • bankAccountID is sent as "NaN".

Root Cause

  • The unvalidated path in VerifiedBankAccountFlowEntryPoint.handleConnectPlaid() returns early and navigates to verification.
  • After validation, flow resumes via reimbursementAccountOptionPressed state.
  • In this resumed path, reimbursementAccount.achData.bankAccountID can still be missing.
  • BankInfo computes:
    • Number(reimbursementAccount?.achData?.bankAccountID)
    • If source is undefined, result is NaN.
  • connectBankAccountWithPlaid() builds request params with this value, so payload can contain NaN.

Impact

  • Frontend logic that relies on bankAccountID === 0 (notably Chase manual fallback checks) can be bypassed when value is NaN.
  • Backend coercion currently masks this in some cases ("NaN" -> 0), which hides the client-side correctness issue.

Expected Behavior

bankAccountID should never be NaN in client payloads. For new/setup flows, it should consistently be 0.

PR Scope

  • Normalize bankAccountID before request creation in connectBankAccountWithPlaid (non-finite -> CONST.DEFAULT_NUMBER_ID).
  • Ensure resumed post-validation flow initializes bank setup state consistently.
Issue OwnerCurrent Issue Owner: @ikevin127
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022034553283540872833
  • Upwork Job ID: 2034553283540872833
  • Last Price Increase: 2026-03-19

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ReviewingHas a PR in review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions