Skip to content

Adding business bank account on wallet#68134

Merged
srikarparsi merged 157 commits intoExpensify:mainfrom
callstack-internal:feat/66073-adding-bba-on-wallet
Feb 16, 2026
Merged

Adding business bank account on wallet#68134
srikarparsi merged 157 commits intoExpensify:mainfrom
callstack-internal:feat/66073-adding-bba-on-wallet

Conversation

@koko57
Copy link
Contributor

@koko57 koko57 commented Aug 7, 2025

Explanation of Change

I decided on a bit different approach as I didn't want to complicate navigation and break anything in Personal Bank Account flow. I reused only the selector, left the logic for the personal account in CountrySelection and created a similar wrapper component that will be only displayed for business flow.
This way we don't need to navigate to Bank Account Purpose page when the user is not an admin and they're redirected straight to the personal flow will all countries selector. Also navigating back and forth and editing from confirmation step is preserved.

Fixed Issues

$ #66073
PROPOSAL:

Tests

  1. Go to Settings -> Wallet
  2. Click "Add bank account"
  3. Verify that you're redirected to (mobile) / RHP opens with (web/desktop) Bank Account Purpose page
  4. Verify that there are 2 buttons: "Get reimbursed" and "Make payments"
  5. Verify that clicking "Get reimbursed" redirects you to the Personal Bank Account flow and you see the Country Selector
  6. Go back - verify that you're redirected to the Bank Account Purpose page with two buttons
  7. Click "Make payments"
  8. Verify that you see Country selector
  9. If you chose USA - verify that you're redirected to the USD Business Account flow and you can login via Plaid
  10. If you chose another country - verify that you can connect manually and you see proper corpay fields
  11. Go through the form and finish the flow
  12. Verify that adding new bank is successful and you see a new bank in your wallet

Partially Set Up Bank Accounts (testing new param in the API call + testing against regressions)

  1. Start adding bank account on the workspace or in the wallet (Make Payments option)
  2. Exit the flow on any of the step
  3. If you're not on the Wallet page, go to the Wallet
  4. Click partially added bank account (with Action required badge)
  5. Verify that the page with Continue Setup appears
  6. Click Continue Setup
  7. Verify that you can continue the setup from the step you left
  8. Finish setting up or close the flow
  9. Click Add Bank Account
  10. Verify that after choosing Make Payments you see "Log in to your bank" and/or "Connect manually"
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native Screenshot 2025-08-14 at 18 08 37
Screen.Recording.2025-08-14.at.18.07.58.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari Screenshot 2025-08-14 at 18 01 18
Screen.Recording.2025-08-14.at.17.51.12.mp4
Screen.Recording.2025-08-14.at.17.50.29.mp4

@koko57 koko57 marked this pull request as ready for review August 14, 2025 16:22
@koko57 koko57 requested review from a team as code owners August 14, 2025 16:23
@melvin-bot melvin-bot bot requested review from dominictb and removed request for a team August 14, 2025 16:23
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2025

@dominictb 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]

@dubielzyk-expensify dubielzyk-expensify self-requested a review August 15, 2025 00:02
@dubielzyk-expensify
Copy link
Contributor

Looking good so far 👍

@dominictb
Copy link
Contributor

dominictb commented Aug 22, 2025

BUG: The top margin for "What do you want to do with your bank account?" feels a bit too large

Screenshot 2025-08-22 at 07 32 53

@koko57
Copy link
Contributor Author

koko57 commented Feb 12, 2026

Ok I fixed this one. The only option is to clear the reimbursementAccount object everytime we exit the flow - that means sending OpenReimbursementAccountPage call everytime we enter cc @joekaufmanexpensify - are you ok with that?

@koko57 is there any reason you envision that this would be an issue? Is making this API call everytime the user enters this page against best practices or something like that?

@joekaufmanexpensify Sorry I missed your earlier comment. Technically it's not problematic at all. Also in terms of UX it shouldn't be problematic (personally I don't find it annoying). But I remember that at some point we wanted the call to api not to be sent if the data was already loaded and the user was in the same Workspace (like the user is in the workflows, enters the flow, leaves the flow and later returns to the flow).

So I'm just asking just to make sure that you're ok with that.

Now as we have the same entry point for Wallet and Workflows clearing the data seems to be the best option. It could be possibly changed/improved when working on #59245 - refactoring ReimbursementAccountPage will be the part of this project

@koko57 koko57 requested a review from dominictb February 12, 2026 11:28
@koko57
Copy link
Contributor Author

koko57 commented Feb 13, 2026

@dominictb friendly bump

Copy link
Contributor

@dominictb dominictb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎀

@dominictb
Copy link
Contributor

Back to @srikarparsi

@dominictb
Copy link
Contributor

We have a failed lint check @koko57

@koko57
Copy link
Contributor Author

koko57 commented Feb 13, 2026

We have a failed lint check @koko57

Yes, I know, but I need to understand why it's failing. It doesn't fail on changes I made and I'm not really sure how to fix it

@koko57
Copy link
Contributor Author

koko57 commented Feb 13, 2026

all checks pass, @srikarparsi the PR is ready for your review

Copy link
Contributor

@joekaufmanexpensify joekaufmanexpensify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good from my perspective too 👍

Copy link
Contributor

@srikarparsi srikarparsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me 🚀

@srikarparsi srikarparsi merged commit 97e2ffd into Expensify:main Feb 16, 2026
32 checks passed
@github-actions
Copy link
Contributor

🚧 @srikarparsi has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/srikarparsi in version: 9.3.20-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@nlemma
Copy link

nlemma commented Feb 16, 2026

@koko57 is it expected that when clicking “Make payments” users are first redirected to the Country Selector and then to the USD Business Account flow? 

@koko57
Copy link
Contributor Author

koko57 commented Feb 16, 2026

@nlemma - yes after Make Payments, first you see the Country selector. Selecting USA redirects to USD flow - you can log in via plaid, when you select another country you go to non-USD flow - you click connect manualyy and then you see corpay fields for a chosen country (SWIFT, IBAN, etc)

@nlemma
Copy link

nlemma commented Feb 16, 2026

Great, thanks for the quick response ^

@koko57
Copy link
Contributor Author

koko57 commented Feb 16, 2026

@nlemma ah, sorry I haven't updated the test steps after Globar Reimbursements were enabled. Now they are updated and they include these steps I mentioned above

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀

platform result
🕸 web 🕸 cancelled 🔪
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants