[No QA] Send addressStreet2 as separate param in UpdatePersonalBankAccountInfo#90350
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…AccountInfo Previously, addressStreet and addressStreet2 were concatenated with a newline character into a single addressStreet parameter. The WAF rejects newlines in that field, causing the request to fail for users with a second address line. Co-authored-by: Chuck Dries <chuckdries@users.noreply.github.com>
1a4ebae to
682ddba
Compare
|
The failing check is unrelated to this PR. Analysis: Evidence: This PR only touches The other failing check ( |
|
The failing Analysis:
The other failing check, |
|
I analyzed the two failing checks. Neither is caused by this PR's code — no fix to push.
|
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Gonna get someone internal to review this since it's impossible to test without modifying the database |
|
@mjasikowski Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| type AdditionalDataFields = Pick<BankAccountAdditionalData, 'firstName' | 'lastName' | 'addressStreet' | 'addressCity' | 'addressState' | 'addressZipCode' | 'companyPhone'>; | ||
|
|
||
| // The BE concatenates addressStreet2 into addressStreet with a newline, so mirror that here to match the stored value. | ||
| const formattedStreet = getFormattedStreet(accountData.addressStreet, accountData.addressStreet2); |
There was a problem hiding this comment.
What's the difference between having this here vs where it was before?
If none, then maybe leave it to reduce the diff?
There was a problem hiding this comment.
Good call. I left the comment because the behavior feels a little non-obvious to me
|
@mkhutornyi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Hi @mkhutornyi, you can disregard this PR as it will be impossible for you to test this flow |
|
Sure. this flow is testable though |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚧 @mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.3.99-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review — no changes required I reviewed the changes in this PR and no updates to Expensify's help site files under Why: This is an internal API/data-formatting fix. It changes how the second address line is sent to the backend —
The relevant help article, Connect a Personal Bank Account, only describes entering your "name, address, and phone number" generically — content that remains accurate after this change. The fix simply makes submitting a two-line address succeed instead of erroring, with no change to the documented steps. Because no documentation changes are needed, I did not create a draft help site PR. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.99-9 🚀
|
Explanation of Change
The
updatePersonalBankAccountInfofunction was concatenatingaddressStreetandaddressStreet2with a newline character (\n) into a singleaddressStreetparameter before sending it to the backend. The WAF rejects newlines in that field, so any user with a second address line would get the error: "Unable to update bank account information. Please try again later."This PR sends
addressStreet2as a separate API parameter instead of concatenating it intoaddressStreet.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/636085
Tests
addressStreet)Offline tests
QA Steps
QAing this is infeasible because you can't create an account in this state
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
addressStreet2.test.mp4