Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/pages/workspace/companyCards/addNew/SelectBankStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function SelectBankStep() {
const {isOffline} = useNetwork();

const [addNewCard] = useOnyx(ONYXKEYS.ADD_NEW_COMPANY_CARD, {canBeMissing: true});
const [shouldUseStagingServer = false] = useOnyx(ONYXKEYS.SHOULD_USE_STAGING_SERVER, {canBeMissing: true});
const [isDebugModeEnabled = false] = useOnyx(ONYXKEYS.IS_DEBUG_MODE_ENABLED, {canBeMissing: true});
const [localBankSelected, setLocalBankSelected] = useState<ValueOf<typeof CONST.COMPANY_CARDS.BANKS> | null>();
const bankSelected = localBankSelected ?? addNewCard?.data.selectedBank;
const [hasError, setHasError] = useState(false);
Expand Down Expand Up @@ -66,9 +68,9 @@ function SelectBankStep() {

const data = Object.values(CONST.COMPANY_CARDS.BANKS)
.filter((bank) => {
// Only show Mock Bank when the frontend environment is not production
// Only show Mock Bank when the frontend environment is not production or when using the staging server with debug mode enabled
if (bank === CONST.COMPANY_CARDS.BANKS.MOCK_BANK) {
return CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION;
return CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION || (shouldUseStagingServer && isDebugModeEnabled);
Copy link
Contributor

@ahmedGaber93 ahmedGaber93 Feb 23, 2026

Choose a reason for hiding this comment

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

@samranahm Based on #81754 OP, the user should be able to see the Mock Bank option on staging without enabling debug mode. Or I missed something?

Per #80391 (review), remove the requirement to be in debug mode. Now you will see the Mock Bank option in staging or dev FE

}
return true;
})
Expand Down
Loading