You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$175] Bank account - Address line is not saved when adding an US bank account #104165
Version Number: 9.5.10-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/test-runs/78924832/folder/57527124/41236750/1865570868?sort=%2Bidentifier Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Web App Component: User Settings
Action Performed:
Preconditions:
Use expensifail account
Steps:
Navigate to Account > Wallet > Add bank account
Select United States and click Next
Connect manually to the bank account
In the "What’s your address?" page, add any info in Adress Line 2
Complete all the required fields
Complete the flow to add the bank account
Expected Result:
Address fields should be saved when adding the bank account.
Actual Result:
After creating the bank account, a Review label is visible in the added US bank account row, address is not being saved.
addPersonalBankAccount joins Address Line 1 and Line 2 with a newline and sends them as one addressStreet value (for example, "123 Main St\nApt 4"). It never sends addressStreet2 on its own. See BankAccounts.ts:564 and PersonalDetailsUtils.ts:319.
Add a unit test that checks the API params when Line 2 is filled.
This fixes both callers: the manual/Plaid flow in AddPersonalBankAccountPage and the Enable Wallet flow in EnablePayments/Wallet/AddBankAccount.
Before merging: an internal engineer should confirm that the AddPersonalBankAccount backend command reads addressStreet2, as UpdatePersonalBankAccountInfo does. If it doesn't, the backend needs a change too.
What alternative solutions did you explore? (Optional)
Strip or replace the newline in the frontend, for example by joining with ", ". I don't recommend this: it doesn't match how the backend stores the two lines for the update flow.
Form keys are correct:AddressStep.tsx:114-124 writes addressStreet and addressStreet2 separately to the draft. The two lines get joined only at submit.
Not verified: I couldn't check the backend or production logs. So it's unconfirmed whether the newline value is blocked or just not stored. Either way, the account is created without an address.
Minor: the Confirmation step shows only Line 1 (ConfirmationStep.tsx:44). This affects display only and doesn't cause the bug.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/104165) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Bank account - Address line is not saved when adding an US bank account[/-][+][$175] Bank account - Address line is not saved when adding an US bank account[/+]on Oct 15, 2026
Please re-state the problem that we are trying to solve in this issue.
When adding a US bank account (either via Plaid or manual connection) and entering an Address with Address Line 2 (addressStreet2), the address is not properly saved, causing a "Review" badge to appear on the newly created bank account row.
What is the root cause of that problem?
1. In src/libs/actions/BankAccounts.ts (addPersonalBankAccount):
In src/libs/actions/BankAccounts.ts:564, addPersonalBankAccount constructs the API parameters by joining addressStreet and addressStreet2 with a newline via getFormattedStreet:
This causes addressStreet to contain a newline (\n), while addressStreet2 is omitted from parameters and is not defined in AddPersonalBankAccountParams.ts.
The backend AddPersonalBankAccount command (like UpdatePersonalBankAccountInfo addressed in PR #90350) validates street input and rejects or discards street data containing newline characters (\n). As documented in PR #90350:
"The BE concatenates addressStreet2 into addressStreet with a newline, so mirror that here to match the stored value."
Because the frontend sent newlines in addressStreet instead of sending addressStreet and addressStreet2 as separate parameters, the backend rejected/dropped the street data.
3. Why the "Review" Badge Appears:
When the bank account is created without a valid street address, isPersonalBankAccountMissingInfo evaluates whether the bank account contains required owner details:
Since additionalData.addressStreet is missing/empty, hasOwnerAddress(additionalData) returns false, causing isPersonalBankAccountMissingInfo to return true, which flags the account with the Review badge.
already pass addressStreet and addressStreet2 as separate keys in the accountData object passed to addPersonalBankAccount. The omission and newline concatenation only occurred inside addPersonalBankAccount itself.
What changes do you think we should make in order to solve the problem?
1. Add addressStreet2 to AddPersonalBankAccountParams.ts:
test('sends addressStreet and addressStreet2 as separate parameters without newlines',()=>{addPersonalBankAccount({addressStreet: '123 Main St',addressStreet2: 'Apt 4B',addressCity: 'New York',addressState: 'NY',addressZipCode: '10001',},undefined,);expect(mockWrite).toHaveBeenCalledWith(WRITE_COMMANDS.ADD_PERSONAL_BANK_ACCOUNT,expect.objectContaining({addressStreet: '123 Main St',addressStreet2: 'Apt 4B',}),expect.anything(),);});
What alternative solutions did you explore? (Optional)
Concatenating addressStreet and addressStreet2 on the client with a comma or space (e.g. 123 Main St, Apt 4B). This was rejected because Expensify backend APIs and database schemas maintain distinct fields for address line 1 and line 2 (as established in UpdatePersonalBankAccountInfo in PR [No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo #90350). Passing addressStreet2 as a distinct parameter follows the standard established throughout the codebase.
📣 @David-2002065! 📣
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:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
When adding a US personal bank account (manually or via Plaid) and entering an address with Address Line 2 (addressStreet2), the address is not properly saved, causing the newly created bank account row to display a "Review" badge in Settings > Wallet.
What is the root cause of that problem?
Newline concatenation in addPersonalBankAccount (src/libs/actions/BankAccounts.ts):
In src/libs/actions/BankAccounts.ts (line 564):
getFormattedStreet(street1, street2) formats the street by joining both lines with a newline character:
return`${street1}\n${street2}`;
It assigns the combined string to addressStreet, while omitting addressStreet2 from the API parameters. In addition, addressStreet2 is completely missing from AddPersonalBankAccountParams.ts.
"The BE concatenates addressStreet2 into addressStreet with a newline, so mirror that here to match the stored value."
Because addPersonalBankAccount sent newlines in addressStreet instead of sending addressStreet2 as an independent parameter, the backend dropped or failed validation for the address.
Why the "Review" Badge appears:
In src/libs/BankAccountUtils.ts (lines 175–193), isPersonalBankAccountMissingInfo validates whether an account has required owner address information via hasOwnerAddress:
Because additionalData.addressStreet was dropped, hasOwnerAddress returns false, causing isPersonalBankAccountMissingInfo to return true, which flags the bank account with the Review badge.
Caller verification:
Both calling components:
src/pages/AddPersonalBankAccountPage/index.tsx
src/pages/EnablePayments/Wallet/AddBankAccount/AddBankAccount.tsx
already collect and store addressStreet and addressStreet2 as distinct fields in draft state. The incorrect formatting only happens inside addPersonalBankAccount when assembling API parameters.
What changes do you think we should make in order to solve the problem?
Add addressStreet2 to API parameter types (src/libs/API/parameters/AddPersonalBankAccountParams.ts):
Unit Tests:
Add a test case in tests/unit/BankAccountsTest.ts to assert that when addPersonalBankAccount is called with addressStreet and addressStreet2, the API call receives both parameters separately without newline concatenation.
What alternative solutions did you explore? (Optional)
Replacing newlines with commas or spaces in addressStreet: Rejected because the backend expects addressStreet2 as a separate parameter for address normalization, matching UpdatePersonalBankAccountInfo.
addPersonalBankAccount now sends addressStreet (Line 1) and addressStreet2 (Line 2, or '') as separate params, matching updatePersonalBankAccountInfo. I added addressStreet2 to AddPersonalBankAccountParams and two unit tests.
Unit tests, typecheck, lint, format, and spell checks pass. My automated web check couldn't run because the test browser session showed a blank page. Before merging, please check on staging that both address lines persist after reload.
Activity
applause-bot commentedon Oct 15, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/29331da153ada80b72719bfe2f52b155a3747d2d1e894dfb24d1d776552948ba
MelvinBot commentedon Oct 15, 2026
Proposal
What is the root cause of that problem?
addPersonalBankAccountjoins Address Line 1 and Line 2 with a newline and sends them as oneaddressStreetvalue (for example,"123 Main St\nApt 4"). It never sendsaddressStreet2on its own. SeeBankAccounts.ts:564andPersonalDetailsUtils.ts:319.We already know this field rejects newlines. [No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo found this for the update flow and fixed it by sending
addressStreet2separately. The add flow was never changed.Without a saved street,
isPersonalBankAccountMissingInforeturns true, and the row shows Review.What changes do you think we should make in order to solve the problem?
addPersonalBankAccount, sendaddressStreetas Line 1 only and add a separateaddressStreet2param. Match howupdatePersonalBankAccountInfodoes it.addressStreet2?: stringtoAddPersonalBankAccountParams.ts.This fixes both callers: the manual/Plaid flow in
AddPersonalBankAccountPageand the Enable Wallet flow inEnablePayments/Wallet/AddBankAccount.Before merging: an internal engineer should confirm that the
AddPersonalBankAccountbackend command readsaddressStreet2, asUpdatePersonalBankAccountInfodoes. If it doesn't, the backend needs a change too.What alternative solutions did you explore? (Optional)
Strip or replace the newline in the frontend, for example by joining with
", ". I don't recommend this: it doesn't match how the backend stores the two lines for the update flow.Investigation details
getFormattedStreet(...)to the add params.AddressStep.tsx:114-124writesaddressStreetandaddressStreet2separately to the draft. The two lines get joined only at submit.ConfirmationStep.tsx:44). This affects display only and doesn't cause the bug.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/104165)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Oct 15, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @nyomanjyotisa (
External)[-]Bank account - Address line is not saved when adding an US bank account[/-][+][$175] Bank account - Address line is not saved when adding an US bank account[/+]melvin-bot commentedon Oct 15, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
janiya2 commentedon Oct 15, 2026
Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/janithad
Proposal
Please re-state the problem that we are trying to solve in this issue.
When adding a US bank account (either via Plaid or manual connection) and entering an Address with Address Line 2 (
addressStreet2), the address is not properly saved, causing a "Review" badge to appear on the newly created bank account row.What is the root cause of that problem?
1. In
src/libs/actions/BankAccounts.ts(addPersonalBankAccount):In
src/libs/actions/BankAccounts.ts:564,addPersonalBankAccountconstructs the API parameters by joiningaddressStreetandaddressStreet2with a newline viagetFormattedStreet:getFormattedStreetformats the street as:This causes
addressStreetto contain a newline (\n), whileaddressStreet2is omitted fromparametersand is not defined inAddPersonalBankAccountParams.ts.2. Backend Validation & Precedent in PR #90350:
The backend
AddPersonalBankAccountcommand (likeUpdatePersonalBankAccountInfoaddressed in PR #90350) validates street input and rejects or discards street data containing newline characters (\n). As documented in PR #90350:Because the frontend sent newlines in
addressStreetinstead of sendingaddressStreetandaddressStreet2as separate parameters, the backend rejected/dropped the street data.3. Why the "Review" Badge Appears:
When the bank account is created without a valid street address,
isPersonalBankAccountMissingInfoevaluates whether the bank account contains required owner details:Since
additionalData.addressStreetis missing/empty,hasOwnerAddress(additionalData)returnsfalse, causingisPersonalBankAccountMissingInfoto returntrue, which flags the account with the Review badge.4. Verification of Call Sites:
Both caller components:
src/pages/AddPersonalBankAccountPage/index.tsx(lines 132-133)src/pages/EnablePayments/Wallet/AddBankAccount/AddBankAccount.tsx(lines 92-93)already pass
addressStreetandaddressStreet2as separate keys in theaccountDataobject passed toaddPersonalBankAccount. The omission and newline concatenation only occurred insideaddPersonalBankAccountitself.What changes do you think we should make in order to solve the problem?
1. Add
addressStreet2toAddPersonalBankAccountParams.ts:In
src/libs/API/parameters/AddPersonalBankAccountParams.ts:2. Send
addressStreetandaddressStreet2as separate parameters inBankAccounts.ts:In
src/libs/actions/BankAccounts.ts:3. Display Consistency in
ConfirmationStep.tsx:In
src/pages/AddPersonalBankAccountPage/substeps/ConfirmationStep.tsx:44, ensure Address Line 2 is displayed in the address review item if present:4. Automated Unit Tests:
In
tests/unit/BankAccountsTest.ts, add a unit test indescribe('addPersonalBankAccount', ...):What alternative solutions did you explore? (Optional)
addressStreetandaddressStreet2on the client with a comma or space (e.g.123 Main St, Apt 4B). This was rejected because Expensify backend APIs and database schemas maintain distinct fields for address line 1 and line 2 (as established inUpdatePersonalBankAccountInfoin PR [No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo #90350). PassingaddressStreet2as a distinct parameter follows the standard established throughout the codebase.melvin-bot commentedon Oct 15, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
melvin-bot commentedon Oct 16, 2026
📣 @David-2002065! 📣
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:
David-2002065 commentedon Oct 16, 2026
Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0162be2e4fafdbae90
melvin-bot commentedon Oct 16, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
7 remaining items
bonnhatnguyen commentedon Oct 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When adding a US personal bank account (manually or via Plaid) and entering an address with Address Line 2 (
addressStreet2), the address is not properly saved, causing the newly created bank account row to display a "Review" badge in Settings > Wallet.What is the root cause of that problem?
Newline concatenation in
addPersonalBankAccount(src/libs/actions/BankAccounts.ts):In
src/libs/actions/BankAccounts.ts(line 564):getFormattedStreet(street1, street2)formats the street by joining both lines with a newline character:It assigns the combined string to
addressStreet, while omittingaddressStreet2from the API parameters. In addition,addressStreet2is completely missing fromAddPersonalBankAccountParams.ts.Backend Rejection & Precedent in PR [No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo #90350:
The backend API
AddPersonalBankAccountvalidates street parameters and rejects street fields containing raw newline characters (\n). As documented in PR #90350 ("[No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo"):Because
addPersonalBankAccountsent newlines inaddressStreetinstead of sendingaddressStreet2as an independent parameter, the backend dropped or failed validation for the address.Why the "Review" Badge appears:
In
src/libs/BankAccountUtils.ts(lines 175–193),isPersonalBankAccountMissingInfovalidates whether an account has required owner address information viahasOwnerAddress:Because
additionalData.addressStreetwas dropped,hasOwnerAddressreturnsfalse, causingisPersonalBankAccountMissingInfoto returntrue, which flags the bank account with the Review badge.Caller verification:
Both calling components:
src/pages/AddPersonalBankAccountPage/index.tsxsrc/pages/EnablePayments/Wallet/AddBankAccount/AddBankAccount.tsxalready collect and store
addressStreetandaddressStreet2as distinct fields in draft state. The incorrect formatting only happens insideaddPersonalBankAccountwhen assembling API parameters.What changes do you think we should make in order to solve the problem?
addressStreet2to API parameter types (src/libs/API/parameters/AddPersonalBankAccountParams.ts):addressStreetandaddressStreet2separately inaddPersonalBankAccount(src/libs/actions/BankAccounts.ts):Add a test case in
tests/unit/BankAccountsTest.tsto assert that whenaddPersonalBankAccountis called withaddressStreetandaddressStreet2, the API call receives both parameters separately without newline concatenation.What alternative solutions did you explore? (Optional)
addressStreet: Rejected because the backend expectsaddressStreet2as a separate parameter for address normalization, matchingUpdatePersonalBankAccountInfo.Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0139ed4098bdc50182
melvin-bot commentedon Oct 19, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
puneetlath commentedon Oct 21, 2026
Will raise the backend PR
puneetlath commentedon Oct 21, 2026
Ok PR to accept
addressStreet2in the API is up. @nyomanjyotisa can you go ahead and select a FE solution?nyomanjyotisa commentedon Oct 22, 2026
@puneetlath @MelvinBot’s revised frontend proposal looks good. We’ll need to verify both address lines persist after reload once the backend change is deployed, before merging.
🎀👀🎀 C+ reviewed
melvin-bot commentedon Oct 22, 2026
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
puneetlath commentedon Oct 22, 2026
Ok sounds good. Please go ahead. The back-end change is already on staging.
nyomanjyotisa commentedon Oct 23, 2026
@MelvinBot please implement the frontend changes in this proposal.
MelvinBot commentedon Oct 23, 2026
🤖 Draft PR created: Send addressStreet2 as a separate param in AddPersonalBankAccount
Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.
addPersonalBankAccountnow sendsaddressStreet(Line 1) andaddressStreet2(Line 2, or'') as separate params, matchingupdatePersonalBankAccountInfo. I addedaddressStreet2toAddPersonalBankAccountParamsand two unit tests.Unit tests, typecheck, lint, format, and spell checks pass. My automated web check couldn't run because the test browser session showed a blank page. Before merging, please check on staging that both address lines persist after reload.
melvin-bot commentedon Oct 24, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022113918619943937131