You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-11-25] [$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards #105757
Version Number: 9.5.27-2 Reproducible in staging?: Expected Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@dylanexpensify Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Login as new user
Navigate to Wallet
Click on the "Add personal card"
Selects United States as Country
Observe the Bank options to select
Expected Result:
Mock bank is not a selectable option under Who's your bank?
Actual Result:
Mock bank is a selectable option
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
The personal card "Who's your bank?" list shows every value in CONST.PERSONAL_CARDS.BANKS, and that list includes MOCK_BANK. Nothing hides it in production.
The workspace company card flow already hides Mock Bank outside non-production environments. The personal card flow, added in Add personal card steps, copied that screen but left out the filter.
What changes do you think we should make in order to solve the problem?
In the personal card SelectBankStep:
Read ONYXKEYS.ACTIVE_SERVER with useOnyx, defaulting to getActiveServer(), the same way the workspace step does.
Filter CONST.PERSONAL_CARDS.BANKS before mapping. Keep MOCK_BANK only when CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION or activeServer !== CONST.SERVER.PRODUCTION.
Mock Bank stays available for dev and staging testing. Production users no longer see it.
Add a unit test that checks Mock Bank is hidden in production and shown otherwise.
What alternative solutions did you explore? (Optional)
Move the visibility check into a shared CardUtils helper, for example shouldShowMockBank(activeServer). Both bank steps would then use it, so the two lists can't drift apart again.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/105757) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/-][+][$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/+]on Nov 3, 2026
Please re-state the problem that we are trying to solve in this issue.
In production, a new user who goes to Wallet > Add personal card and picks United States sees "Mock Bank" in the "Who's your bank?" list. It is a test-only option and should only appear on dev and staging.
What is the root cause of that problem?
The personal card bank screen builds its list from every value in CONST.PERSONAL_CARDS.BANKS, and that list includes MOCK_BANK. src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx maps the whole list with no filter.
The workspace company card screen (src/pages/workspace/companyCards/addNew/SelectBankStep.tsx) does hide Mock Bank in production. Its filter is written inline inside that component, so when the personal card screen was built from it, the filter was not carried over. Nothing shares the rule, so the two screens drifted apart.
What changes do you think we should make in order to solve the problem?
Put the "is Mock Bank allowed here" rule in one place and use it on both screens:
In src/libs/CardUtils.ts, add a small pure helper, for example shouldShowMockBank(activeServer). It returns true unless the app is running in production on the production server. That is the same condition the workspace screen uses today: CONFIG.ENVIRONMENT !== PRODUCTION || activeServer !== SERVER.PRODUCTION.
In the personal card SelectBankStep, read ONYXKEYS.ACTIVE_SERVER the same way the workspace screen does (useOnyx(ONYXKEYS.ACTIVE_SERVER) with getActiveServer() as the default). Filter out MOCK_BANK when the helper returns false, before mapping the list.
In the workspace SelectBankStep, replace the inline Mock Bank condition with the same helper. Behavior there does not change.
Dev and staging still show Mock Bank for testing. Production users no longer see it on either screen.
What alternative solutions did you explore? (Optional)
Copy the inline filter into the personal screen. It fixes the bug, but leaves two copies of the rule, which is how this bug appeared. A shared helper means the next bank screen cannot forget it.
Remove MOCK_BANK from CONST.PERSONAL_CARDS.BANKS. This would break dev and staging testing, and the icon map in CardUtils.getPersonalBankCardDetailsImage still expects the key.
Automated Tests
Add unit tests for the helper in tests/unit/CardUtilsTest.ts, with CONFIG.ENVIRONMENT mocked:
Production environment and production server: returns false.
Production environment but a non-production server: returns true.
Please re-state the problem that we are trying to solve in this issue.
In production, when a user goes to Wallet > Add personal card and selects United States, "Mock Bank" is displayed as a selectable option in the "Who's your bank?" list. "Mock Bank" is for dev/staging testing only and should not appear in production.
What is the root cause of that problem?
In src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx (line 55):
In the workspace company cards flow (src/pages/workspace/companyCards/addNew/SelectBankStep.tsx:62-71), MOCK_BANK is explicitly filtered out unless in non-production:
However, the personal cards SelectBankStep.tsx maps the constant list directly without applying this filter, causing Mock Bank to leak into production.
What changes do you think we should make in order to solve the problem?
Align src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx with the established pattern from src/pages/workspace/companyCards/addNew/SelectBankStep.tsx:
Import CONFIG from @src/CONFIG and getActiveServer from @libs/ApiUtils.
--- a/src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx+++ b/src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx@@ -16,6 +16,8 @@
import useThemeStyles from '@hooks/useThemeStyles';
+import {getActiveServer} from '@libs/ApiUtils';
import {getPersonalBankCardDetailsImage} from '@libs/CardUtils';
import variables from '@styles/variables';
@@ -23,6 +25,7 @@
import {setAddNewPersonalCardStepAndData} from '@userActions/PersonalCards';
+import CONFIG from '@src/CONFIG';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
@@ -31,6 +34,7 @@ function SelectBankStep() {
const {isOffline} = useNetwork();
+ const [activeServer = getActiveServer()] = useOnyx(ONYXKEYS.ACTIVE_SERVER);
const [addNewPersonalCard] = useOnyx(ONYXKEYS.ADD_NEW_PERSONAL_CARD);
const [bankSelected, setBankSelected] = useState<ValueOf<typeof CONST.PERSONAL_CARDS.BANKS> | null | undefined>(addNewPersonalCard?.data?.selectedBank);
@@ -52,7 +56,13 @@ function SelectBankStep() {
};
- const data = Object.values(CONST.PERSONAL_CARDS.BANKS).map((bank) => ({+ const data = Object.values(CONST.PERSONAL_CARDS.BANKS)+ .filter((bank) => {+ if (bank === CONST.PERSONAL_CARDS.BANKS.MOCK_BANK) {+ return CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION || activeServer !== CONST.SERVER.PRODUCTION;+ }+ return true;+ })+ .map((bank) => ({
value: bank,
text: bank === CONST.PERSONAL_CARDS.BANKS.OTHER ? translate('workspace.companyCards.addNewCard.other') : bank,
What alternative solutions did you explore? (Optional)
Extracting a shared helper function shouldShowMockBank(activeServer) in CardUtils.ts was explored. However, applying the check directly in SelectBankStep.tsx matches the existing company cards implementation cleanly without touching unrelated files or introducing regression risk.
What automated tests can you add to prevent this from re-occurring?
In tests/unit/PersonalCardsSelectBankStepTest.tsx:
Verify that when CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.PRODUCTION and activeServer === CONST.SERVER.PRODUCTION, Mock Bank is excluded from the list.
Verify that when CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION, Mock Bank is present and selectable.
Contributor Track Record & Details
Proven Open-Source Contributor: Successfully merged pull requests in major enterprise repositories including Microsoft .NET runtime (PR reference: dotnet/runtime#136828).
Ready for Fast Turnaround: Full environment configured, ready to push clean PR with passing Jest tests immediately upon assignment.
Verified the dev web flow, including Mock Bank and real-bank options; new-user status was not independently confirmed. Production UI was not tested.
Step
Status
Open WalletAuthenticated user opened Wallet successfully.
✅
Click Add personal cardCountry selection appeared.
✅
Select United StatesThe bank selection screen appeared.
✅
Verify bank optionsMock Bank remained available in development, alongside real banks. Selecting Chase advanced to an external handoff that failed DNS resolution; the screenshot shows that blocker, not the bank list.
changed the title [-][$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/-][+][Due for payment 2026-11-25] [$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/+]on Nov 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-25. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
MelvinBot commentedon Nov 3, 2026
Proposal
What is the root cause of that problem?
The personal card "Who's your bank?" list shows every value in
CONST.PERSONAL_CARDS.BANKS, and that list includesMOCK_BANK. Nothing hides it in production.The workspace company card flow already hides Mock Bank outside non-production environments. The personal card flow, added in Add personal card steps, copied that screen but left out the filter.
Code references
src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx:61MOCK_BANK: 'Mock Bank'in the personal banks constant:src/CONST/index.ts:6018src/pages/workspace/companyCards/addNew/SelectBankStep.tsx:62-71What changes do you think we should make in order to solve the problem?
In the personal card
SelectBankStep:ONYXKEYS.ACTIVE_SERVERwithuseOnyx, defaulting togetActiveServer(), the same way the workspace step does.CONST.PERSONAL_CARDS.BANKSbefore mapping. KeepMOCK_BANKonly whenCONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTIONoractiveServer !== CONST.SERVER.PRODUCTION.Mock Bank stays available for dev and staging testing. Production users no longer see it.
Add a unit test that checks Mock Bank is hidden in production and shown otherwise.
What alternative solutions did you explore? (Optional)
Move the visibility check into a shared
CardUtilshelper, for exampleshouldShowMockBank(activeServer). Both bank steps would then use it, so the two lists can't drift apart again.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/105757)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Nov 3, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @truph01 (
External)[-]Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/-][+][$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/+]melvin-bot commentedon Nov 3, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022117602096506940022
Aschio12 commentedon Nov 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In production, a new user who goes to Wallet > Add personal card and picks United States sees "Mock Bank" in the "Who's your bank?" list. It is a test-only option and should only appear on dev and staging.
What is the root cause of that problem?
The personal card bank screen builds its list from every value in
CONST.PERSONAL_CARDS.BANKS, and that list includesMOCK_BANK.src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsxmaps the whole list with no filter.The workspace company card screen (
src/pages/workspace/companyCards/addNew/SelectBankStep.tsx) does hide Mock Bank in production. Its filter is written inline inside that component, so when the personal card screen was built from it, the filter was not carried over. Nothing shares the rule, so the two screens drifted apart.What changes do you think we should make in order to solve the problem?
Put the "is Mock Bank allowed here" rule in one place and use it on both screens:
src/libs/CardUtils.ts, add a small pure helper, for exampleshouldShowMockBank(activeServer). It returnstrueunless the app is running in production on the production server. That is the same condition the workspace screen uses today:CONFIG.ENVIRONMENT !== PRODUCTION || activeServer !== SERVER.PRODUCTION.SelectBankStep, readONYXKEYS.ACTIVE_SERVERthe same way the workspace screen does (useOnyx(ONYXKEYS.ACTIVE_SERVER)withgetActiveServer()as the default). Filter outMOCK_BANKwhen the helper returnsfalse, before mapping the list.SelectBankStep, replace the inline Mock Bank condition with the same helper. Behavior there does not change.Dev and staging still show Mock Bank for testing. Production users no longer see it on either screen.
What alternative solutions did you explore? (Optional)
MOCK_BANKfromCONST.PERSONAL_CARDS.BANKS. This would break dev and staging testing, and the icon map inCardUtils.getPersonalBankCardDetailsImagestill expects the key.Automated Tests
Add unit tests for the helper in
tests/unit/CardUtilsTest.ts, withCONFIG.ENVIRONMENTmocked:false.true.true.Contributor details
Your Expensify account email: aschalewdere2@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01b64b281fe1263953
melvin-bot commentedon Nov 3, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
camesenin commentedon Nov 3, 2026
melvin-bot commentedon Nov 3, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
sumit-2007-git commentedon Nov 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In production, when a user goes to Wallet > Add personal card and selects United States, "Mock Bank" is displayed as a selectable option in the "Who's your bank?" list. "Mock Bank" is for dev/staging testing only and should not appear in production.
What is the root cause of that problem?
In
src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsx(line 55):CONST.PERSONAL_CARDS.BANKScontainsMOCK_BANK: 'Mock Bank'.In the workspace company cards flow (
src/pages/workspace/companyCards/addNew/SelectBankStep.tsx:62-71),MOCK_BANKis explicitly filtered out unless in non-production:However, the personal cards
SelectBankStep.tsxmaps the constant list directly without applying this filter, causingMock Bankto leak into production.What changes do you think we should make in order to solve the problem?
Align
src/pages/settings/Wallet/PersonalCards/steps/SelectBankStep.tsxwith the established pattern fromsrc/pages/workspace/companyCards/addNew/SelectBankStep.tsx:CONFIGfrom@src/CONFIGandgetActiveServerfrom@libs/ApiUtils.activeServerusinguseOnyx:CONST.PERSONAL_CARDS.BANKSbefore mapping:What alternative solutions did you explore? (Optional)
Extracting a shared helper function
shouldShowMockBank(activeServer)inCardUtils.tswas explored. However, applying the check directly inSelectBankStep.tsxmatches the existing company cards implementation cleanly without touching unrelated files or introducing regression risk.What automated tests can you add to prevent this from re-occurring?
In
tests/unit/PersonalCardsSelectBankStepTest.tsx:CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.PRODUCTIONandactiveServer === CONST.SERVER.PRODUCTION,Mock Bankis excluded from the list.CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION,Mock Bankis present and selectable.Contributor Track Record & Details
sumit-2007-git commentedon Nov 4, 2026
Contributor details
Your Expensify account email: sumitkeshri.1237373@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~015b34e130d9aad41d
8 remaining items
truph01 commentedon Nov 12, 2026
@MelvinBot Your proposal looks good #105757 (comment). Draft PR
MelvinBot commentedon Nov 12, 2026
🤖 Web test steps verification results:⚠️ partial
Verified the dev web flow, including Mock Bank and real-bank options; new-user status was not independently confirmed. Production UI was not tested.

Open Wallet
Authenticated user opened Wallet successfully.Click Add personal card
Country selection appeared.Select United States
The bank selection screen appeared.Verify bank options
Mock Bank remained available in development, alongside real banks. Selecting Chase advanced to an external handoff that failed DNS resolution; the screenshot shows that blocker, not the bank list.Created draft PR: Hide Mock Bank from personal cards in production, assigned to
truph01.All 39,103 executed tests passed, including five new regression cases. Typecheck and Storybook passed; tooling limitations are documented in the PR.
The branch is upstream because I cannot push to your fork. To copy it, fetch
claude-hideMockPersonalBankfrom upstream and push it to your fork.view run · no recording available
expensify-chore-bot commentedon Nov 17, 2026
Triggered auto assignment to @pecanoro, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
[-][$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/-][+][Due for payment 2026-11-25] [$175] Mock bank is displayed as a selectable option for a new user to connect in Personal cards[/+]melvin-bot commentedon Nov 18, 2026
@truph01
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-25. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]