-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ReviewingHas a PR in reviewHas a PR in review
Description
Problem
In the USD reimbursement bank account flow, the CONNECT_BANK_ACCOUNT_WITH_PLAID request can be sent with bankAccountID=NaN.
Reproduction
- Use an account where
account.validatedisfalse. - Go to workspace bank account setup.
- Choose Connect online with Plaid.
- App redirects to verify account (
ROUTES.BANK_ACCOUNT_VERIFY_ACCOUNT.getRoute(policyID, backTo)). - Complete validation and return to the reimbursement flow.
- Complete Plaid auth, select a bank account (Savings/Checking), and continue (quick click on Next makes this easier to hit).
- Inspect the API payload for
CONNECT_BANK_ACCOUNT_WITH_PLAID:bankAccountIDis sent as"NaN".
Root Cause
- The unvalidated path in
VerifiedBankAccountFlowEntryPoint.handleConnectPlaid()returns early and navigates to verification. - After validation, flow resumes via
reimbursementAccountOptionPressedstate. - In this resumed path,
reimbursementAccount.achData.bankAccountIDcan still be missing. BankInfocomputes:Number(reimbursementAccount?.achData?.bankAccountID)- If source is
undefined, result isNaN.
connectBankAccountWithPlaid()builds request params with this value, so payload can containNaN.
Impact
- Frontend logic that relies on
bankAccountID === 0(notably Chase manual fallback checks) can be bypassed when value isNaN. - 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
bankAccountIDbefore request creation inconnectBankAccountWithPlaid(non-finite ->CONST.DEFAULT_NUMBER_ID). - Ensure resumed post-validation flow initializes bank setup state consistently.
Issue Owner
Current Issue Owner: @ikevin127Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022034553283540872833
- Upwork Job ID: 2034553283540872833
- Last Price Increase: 2026-03-19
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ReviewingHas a PR in reviewHas a PR in review