Skip to content

Feat: Locked bank account#69159

Open
MrMuzyk wants to merge 76 commits intoExpensify:mainfrom
callstack-internal:feat/66077-locked-account
Open

Feat: Locked bank account#69159
MrMuzyk wants to merge 76 commits intoExpensify:mainfrom
callstack-internal:feat/66077-locked-account

Conversation

@MrMuzyk
Copy link
Contributor

@MrMuzyk MrMuzyk commented Aug 25, 2025

Explanation of Change

  • implemented Locked badge on locked accounts on Workspace -> Workflows and Wallet pages
  • implemented modal informing user about locked account when trying to pay for expense with such account
  • added a new API call that initiates unlocking bank account process from Concierge chat
  • implemented flow where pressing on locked bank account on wallet or workflows page starts the unlock process and takes user to Concierge chat
  • added RBR in LHN to let user know that something is wrong with the account
  • locked bank account now is being shown on settlement button and split button

Fixed Issues

$ #66077
PROPOSAL:

Tests

Same as QA steps

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Scenario A:
Precondition: Be on account that is an admin and reimburser of workspace with connected locked business bank account

  • go to workspace with connected locked bank account
  • go to workflows tab
  • locked account should have a Locked badge
  • pressing on this account should take user to concierge chat
  • after user is navigated a to concierge chat an API call initiating unlock bank account process should be performed and user should receive a message about starting such process

Scenario B:
Precondition: Be on account that is an admin and is not reimburser of workspace with connected locked business bank account

  • go to workspace with connected locked bank account
  • go to workflows tab
  • locked account should have a Locked badge
  • pressing on this account should not trigger any action

Scenario C:
Precondition: Be on account with connected locked business bank account

  • go to Account -> Wallet page
  • locked account should have a Locked badge
  • pressing on this account should take user to concierge chat
  • after user is navigated a to concierge chat an API call initiating unlock bank account process should be performed and user should receive a message about starting such process

Scenario D:
Precondition: Be on account with connected locked business bank account

  • go to an unpaid expense

  • try to pay with locked bank account

  • a modal should appear informing of locked bank account

  • after confirming modal's prompt user is navigated a to concierge chat an API call initiating unlock bank account process should be performed and user should receive a message about starting such process

  • 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
    • MacOS: Desktop
  • 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 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.native.mp4
Android: mWeb Chrome
android.web.mp4
iOS: Native
ios.native.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
MacOS: Desktop
web.mp4

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 95.20% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/components/MenuItem.tsx 87.09% <ø> (ø)
src/hooks/useNavigationTabBarIndicatorChecks.ts 100.00% <100.00%> (ø)
src/hooks/useSearchPageSetup.ts 100.00% <ø> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/PaymentUtils.ts 78.57% <100.00%> (+0.79%) ⬆️
src/libs/actions/Report/index.ts 68.02% <ø> (ø)
src/libs/actions/Search.ts 23.79% <100.00%> (+0.28%) ⬆️
src/pages/inbox/ReportScreen.tsx 71.19% <100.00%> (+0.06%) ⬆️
... and 14 more
... and 8 files with indirect coverage changes

@melvin-bot
Copy link

melvin-bot bot commented Dec 15, 2025

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@trjExpensify
Copy link
Contributor

trjExpensify commented Mar 18, 2026

👋 This was surfaced in #migrate here today. What's the status here, @MrMuzyk? Is it just @srikarparsi's Web PR you're waiting on? If so, that's deployed to staging now.

@MrMuzyk
Copy link
Contributor Author

MrMuzyk commented Mar 19, 2026

@trjExpensify Hi, I know the communication might look confusing as l wasn't responding here but we were discussing this pretty much everyday on slack. Latest updates I was aware of are here.
The diff that was posted here before wasn't working properly. We agreed that change of approach is needed and Srikar made a PR that hit review yesterday. I do not have access to this repo so I didn't know if it got merged and deployed.
Now that I do, I'll work on getting this moving forward today :)

@trjExpensify
Copy link
Contributor

Sounds good, thanks! 👍

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #69159.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://69159.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@joekaufmanexpensify
Copy link
Contributor

Optimistic message works now 🎉

@joekaufmanexpensify
Copy link
Contributor

@MrMuzyk We seem to have regressed on #69159 (comment) though. I see the bank account in the split pay button, but we're not showing it in the pay popover menu. Instead just saying "pay with business account". We should show the linked bank account there when there is one.

image

@MrMuzyk
Copy link
Contributor Author

MrMuzyk commented Mar 19, 2026

There is also a case of modal on mobile which Im working on fixing too

image

@MrMuzyk
Copy link
Contributor Author

MrMuzyk commented Mar 20, 2026

@joekaufmanexpensify Ive fixed this bug but Im not able to confirm whether the issue on mobile with modal that Ive found is actually an issue - remote builds are failing since yesterday.

@github-actions
Copy link
Contributor

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

@joekaufmanexpensify
Copy link
Contributor

Confirmed this bank account issue is fixed: #69159 (comment)

@joekaufmanexpensify
Copy link
Contributor

#69159 (comment) is not working on new build, investigating

@MrMuzyk
Copy link
Contributor Author

MrMuzyk commented Mar 23, 2026

image

Working correctly now, ready for review!

@github-actions
Copy link
Contributor

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

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!

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.

5 participants