Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
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 bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
This PR adds a new |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c3a1c99a7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (initiatingBankAccountUnlock?.isLoading && initiatingBankAccountUnlock?.bankAccountIDToUnlock === bankAccountID) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Track each in-flight bank account independently
When multiple locked accounts are acted on before their requests finish, this singleton guard remembers only the latest ID. For example, pressing A, then B, then A while responses are slow makes the third call see B as bankAccountIDToUnlock, bypass the guard, and enqueue a second unlock request for A. Track in-flight state per bank-account ID so alternating between accounts cannot evade deduplication.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is based on the existing implementation. Implementing per bank account ID would require a major refactor and is not in scope for this PR.
| Onyx.connectWithoutView({ | ||
| key: ONYXKEYS.INITIATING_BANK_ACCOUNT_UNLOCK, | ||
| callback: (value) => (initiatingBankAccountUnlock = value), | ||
| }); |
There was a problem hiding this comment.
Explain the direct Onyx connection
This new Onyx.connectWithoutView read has no comment justifying why the action layer needs a direct subscription. The repository's delegated Onyx guidance explicitly requires each such read to be justified rather than copied as a pattern, so add the rationale next to this connection.
AGENTS.md reference: AGENTS.md:L1-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Removed the call in favour of passing the Onyx value to the method calls.
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.
|
Sorry about the noise. I removed the |
|
@akinwale can you plz merge main and fix conflicts |
| const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); | ||
| const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); | ||
| const [betas] = useOnyx(ONYXKEYS.BETAS); | ||
| const lockedBankAccountID = Object.values(bankAccountList).find((account) => account?.accountData?.state === CONST.BANK_ACCOUNT.STATE.LOCKED)?.accountData?.bankAccountID; |
There was a problem hiding this comment.
What if multiple are locked?
There was a problem hiding this comment.
find returns the first match, and we only need one locked bank account even if the user has multiple in this scenario to determine that the user is in the locked state.
There was a problem hiding this comment.
I was concerned that what if the second one is locked and this returns the first one. In that case, we may not receive the request of unlock for the second locked account.
2e8374f to
8f59fdb
Compare
|
I could not review this diff, so I did not approve the workflow runs. An Expensify employee will review it and approve them manually. |
|
@akinwale to test correctly, can you plz make bankAccountId 6119227 as locked in the backend?
|
@Pujan92 I don't have the permissions to do this on the backend. Also, please post the email address associated with the bank account. @clarajones-expensify Could you help with this by locking the bank account with ID 6119227? |
Email - pujan0707+2@gmail.com |
|
@Pujan92 you're too quick!! looking into this now haha |
|
@Pujan92 it is locked! |
|
@clarajones-expensify Thanks! @akinwale type check is failing |
|
@akinwale don't we need to set |
|
@akinwale Let's get this PR wrapped up soon, please. |
|
This fell off my radar. I'll prioritise today. |
Pujan92
left a comment
There was a problem hiding this comment.
LGTM!
I have a doubt #99792 (comment) but it looks rare case at the moment, still would like to know the thought of @tgolen
|
🎯 @Pujan92, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
@Pujan92 I'm almost done with a fix for the offline scenarios since it's valid. |
|
@Pujan92 I've pushed the latest updates. Here are videos showing the offline tests for all three paths (note that the entire bank account row is disabled for the Workflows > Payments payment account list while offline, so the Unlock button can't be clicked there). Screen.Recording.2026-09-17.at.10.22.32.mp4Screen.Recording.2026-09-17.at.10.24.19.mp4Screen.Recording.2026-09-17.at.10.56.44.mp4 |
@akinwale can you make a change for Workflows -> Payments if required, as we are going to allow clicking while offline here too with PR #101450 |
No change required as it is already handled through the Screen.Recording.2026-09-17.at.11.46.10.mp4 |


Explanation of Change
For locked bank accounts, prevent multiple repeated unlock account requests being sent when the user clicks on the button to Fix or Unlock the bank account.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/673219
PROPOSAL: https://github.com/Expensify/Expensify/issues/673219#issue-5195034188
Tests
Prerequisites
Test Steps
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-28.at.14.37.20.mp4
Screen.Recording.2026-08-28.at.14.38.04.mp4
Screen.Recording.2026-08-28.at.14.40.22.mp4