Skip to content

Commit 542a45a

Browse files
committed
Decide if bank setup is finished based on hasInProgressUSDVBBA
1 parent 72de675 commit 542a45a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions';
1818
import {getEligibleBankAccountsForCard, getEligibleBankAccountsForUkEuCard} from '@libs/CardUtils';
1919
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
2020
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
21-
import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES} from '@libs/ReimbursementAccountUtils';
21+
import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES, hasInProgressUSDVBBA} from '@libs/ReimbursementAccountUtils';
2222
import Navigation from '@navigation/Navigation';
2323
import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading';
2424
import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading';
@@ -49,7 +49,7 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
4949
const {isAccountLocked, showLockedAccountModal} = useContext(LockedAccountContext);
5050

5151
const reimbursementAccountStatus = reimbursementAccount?.achData?.state ?? '';
52-
const isSetupUnfinished = isEmptyObject(bankAccountList) && reimbursementAccountStatus && reimbursementAccountStatus !== CONST.BANK_ACCOUNT.STATE.OPEN;
52+
const isSetupUnfinished = hasInProgressUSDVBBA(reimbursementAccount?.achData);
5353
const isUkEuCurrencySupported = useExpensifyCardUkEuSupported(policy?.id);
5454

5555
const eligibleBankAccounts = isUkEuCurrencySupported ? getEligibleBankAccountsForUkEuCard(bankAccountList, policy?.outputCurrency) : getEligibleBankAccountsForCard(bankAccountList);

0 commit comments

Comments
 (0)