Repository navigation
[Payment due @mkhutornyi] Explain why Direct reimbursement blocks a workspace currency change - #106953
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 |
|
@MelvinBot review |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Reviewed commit
|
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safaritest1.movtest2.mov |
|
There's conflict |
# Conflicts: # tests/ui/WorkspaceOverviewCurrencyPageTest.tsx
|
Addressed all your reviews @mkhutornyi. Could you review again? Ty |
| // The server only lets a workspace with Direct reimbursement switch to these currencies. The list copies the server's own | ||
| // direct reimbursement list, which also includes SGD, so it is kept apart from DIRECT_REIMBURSEMENT_CURRENCIES above. | ||
| get CURRENCIES_ALLOWED_ON_DIRECT_WORKSPACE_CHANGE() { | ||
| return [this.CURRENCY.AUD, this.CURRENCY.CAD, this.CURRENCY.EUR, this.CURRENCY.GBP, this.CURRENCY.USD, this.CURRENCY.SGD]; |
There was a problem hiding this comment.
The description contradicts the code.
The Explanation still says the server blocks every currency "except for USD or AUD", and step 15 repeats it.
The code allows six: AUD, CAD, EUR, GBP, USD and SGD.
|
@neil-marcellini 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] |
|
🎯 @mkhutornyi, 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. |
|
No actionable regressions found in static review of Reviewed currency restrictions, onboarding flows, modal navigation, Payments remediation, and currency-error display/dismissal. No tests run, as requested. Runtime behavior and the server-side currency allowlist were not independently verified. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks good thanks.
Two NABs from AI that seem legit. You could do it in a follow up.
4. The new currency list retypes the existing one (new this pass)
CURRENCIES_ALLOWED_ON_DIRECT_WORKSPACE_CHANGE (index.ts:1874-1876) is DIRECT_REIMBURSEMENT_CURRENCIES two lines above plus SGD, written out again. If one list gains a currency, the other can quietly fall behind. Building it from the existing list makes the one difference visible:
get CURRENCIES_ALLOWED_ON_DIRECT_WORKSPACE_CHANGE() {
return [...this.DIRECT_REIMBURSEMENT_CURRENCIES, this.CURRENCY.SGD];
}5. Test mock wraps the real function for no reason (new this pass)
WorkspaceOverviewCurrencyPageTest.tsx:124-125 wraps the real helper in (...args) => requireActual(...).fn(...args). Assigning jest.requireActual<…>('@libs/PolicyUtils/payments').isCurrencyChangeBlockedByDirectReimbursement directly does the same. Tiny; skip if you like.
|
🚧 neil-marcellini 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/neil-marcellini in version: 9.5.52-1 🚀
|
|
No help site update needed — this PR explains an existing currency restriction with a self-contained in-app message and fixes error feedback; it adds no new feature or workflow and makes no existing article sentence incorrect. |


Explanation of Change
UpdateWorkspaceGeneralSettingscurrently blocks changing currency with direct reimbursement enabled, except for USD or AUD. However, in ND we still allow users to change currency without any feedback. In this PR, we added a modal to let user know which currency is allowed and how to turn off the direct reimbursement so they can change the currency.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/679348
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
Screen.Recording.2026-11-16.at.16.54.45.mov
iOS: mWeb Safari
Screen.Recording.2026-11-16.at.16.58.59.mov
MacOS: Chrome / Safari
Screen.Recording.2026-11-16.at.16.52.05.mov
Screen.Recording.2026-11-16.at.16.39.52.mov