From 542a45a0aaee6aa9bc5a2450df95dc85ef87927c Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Thu, 25 Dec 2025 00:49:19 +0530 Subject: [PATCH 1/2] Decide if bank setup is finished based on hasInProgressUSDVBBA --- .../expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx index 9c7c890ff5d3..15764ca32e19 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx @@ -18,7 +18,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {getEligibleBankAccountsForCard, getEligibleBankAccountsForUkEuCard} from '@libs/CardUtils'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types'; -import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES} from '@libs/ReimbursementAccountUtils'; +import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES, hasInProgressUSDVBBA} from '@libs/ReimbursementAccountUtils'; import Navigation from '@navigation/Navigation'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; @@ -49,7 +49,7 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif const {isAccountLocked, showLockedAccountModal} = useContext(LockedAccountContext); const reimbursementAccountStatus = reimbursementAccount?.achData?.state ?? ''; - const isSetupUnfinished = isEmptyObject(bankAccountList) && reimbursementAccountStatus && reimbursementAccountStatus !== CONST.BANK_ACCOUNT.STATE.OPEN; + const isSetupUnfinished = hasInProgressUSDVBBA(reimbursementAccount?.achData); const isUkEuCurrencySupported = useExpensifyCardUkEuSupported(policy?.id); const eligibleBankAccounts = isUkEuCurrencySupported ? getEligibleBankAccountsForUkEuCard(bankAccountList, policy?.outputCurrency) : getEligibleBankAccountsForCard(bankAccountList); From 7d41dcfa671860a82cb615ea675942176318658d Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Sun, 28 Dec 2025 11:24:20 +0530 Subject: [PATCH 2/2] Lint fixes --- .../expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx index 15764ca32e19..6ec72aab94e9 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx @@ -18,7 +18,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {getEligibleBankAccountsForCard, getEligibleBankAccountsForUkEuCard} from '@libs/CardUtils'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types'; -import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES, hasInProgressUSDVBBA} from '@libs/ReimbursementAccountUtils'; +import {hasInProgressUSDVBBA, REIMBURSEMENT_ACCOUNT_ROUTE_NAMES} from '@libs/ReimbursementAccountUtils'; import Navigation from '@navigation/Navigation'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; @@ -29,7 +29,6 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -import {isEmptyObject} from '@src/types/utils/EmptyObject'; type WorkspaceExpensifyCardPageEmptyStateProps = { route: PlatformStackScreenProps['route']; @@ -48,7 +47,6 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif const {isActingAsDelegate, showDelegateNoAccessModal} = useContext(DelegateNoAccessContext); const {isAccountLocked, showLockedAccountModal} = useContext(LockedAccountContext); - const reimbursementAccountStatus = reimbursementAccount?.achData?.state ?? ''; const isSetupUnfinished = hasInProgressUSDVBBA(reimbursementAccount?.achData); const isUkEuCurrencySupported = useExpensifyCardUkEuSupported(policy?.id);