diff --git a/src/pages/workspace/expensifyCard/WorkspaceCardsListLabel.tsx b/src/pages/workspace/expensifyCard/WorkspaceCardsListLabel.tsx index 9c2d5093595b..7e416219db36 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceCardsListLabel.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceCardsListLabel.tsx @@ -48,16 +48,17 @@ function WorkspaceCardsListLabel({type, value, style}: WorkspaceCardsListLabelPr const {shouldUseNarrowLayout, isMediumScreenWidth} = useResponsiveLayout(); const theme = useTheme(); const {translate} = useLocalize(); - const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); + const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST, {canBeMissing: true}); const [isVisible, setVisible] = useState(false); const [anchorPosition, setAnchorPosition] = useState({top: 0, left: 0}); const anchorRef = useRef(null); const workspaceAccountID = policy?.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID; - const policyCurrency = useMemo(() => policy?.outputCurrency ?? CONST.CURRENCY.USD, [policy]); - const [cardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`); - const [cardManualBilling] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_MANUAL_BILLING}${workspaceAccountID}`); + // Currently Expensify Cards only support USD, once support for more currencies is implemented, we will need to update this + const policyCurrency = CONST.CURRENCY.USD; + const [cardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`, {canBeMissing: true}); + const [cardManualBilling] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_MANUAL_BILLING}${workspaceAccountID}`, {canBeMissing: true}); const paymentBankAccountID = cardSettings?.paymentBankAccountID; const isLessThanMediumScreen = isMediumScreenWidth || shouldUseNarrowLayout; diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx index ba318add3987..8a0db27da1e8 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx @@ -80,7 +80,8 @@ function WorkspaceExpensifyCardListPage({route, cardsList, fundID}: WorkspaceExp const {windowHeight} = useWindowDimensions(); const headerHeight = useEmptyViewHeaderHeight(shouldUseNarrowLayout, isBankAccountVerified); - const policyCurrency = useMemo(() => policy?.outputCurrency ?? CONST.CURRENCY.USD, [policy]); + // Currently Expensify Cards only support USD, once support for more currencies is implemented, we will need to update this + const policyCurrency = CONST.CURRENCY.USD; const allCards = useMemo(() => { const policyMembersAccountIDs = Object.values(getMemberAccountIDsForWorkspace(policy?.employeeList));