From ec885801cfdb0bf54df34308bdfffd7fb693e7c9 Mon Sep 17 00:00:00 2001 From: Yauheni Pasiukevich Date: Thu, 6 Jun 2024 09:32:09 +0200 Subject: [PATCH] revert default card --- src/pages/settings/Subscription/CardSection/CardSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Subscription/CardSection/CardSection.tsx b/src/pages/settings/Subscription/CardSection/CardSection.tsx index b04d6752301c..da65c9d74f07 100644 --- a/src/pages/settings/Subscription/CardSection/CardSection.tsx +++ b/src/pages/settings/Subscription/CardSection/CardSection.tsx @@ -20,7 +20,7 @@ function CardSection() { const theme = useTheme(); const [fundList] = useOnyx(ONYXKEYS.FUND_LIST); - const defaultCard = useMemo(() => Object.values(fundList ?? {}).find((card) => card.accountData?.additionalData?.isBillingCard), [fundList]); + const defaultCard = useMemo(() => Object.values(fundList ?? {}).find((card) => card.isDefault), [fundList]); const cardMonth = useMemo(() => DateUtils.getMonthNames(preferredLocale)[(defaultCard?.accountData?.cardMonth ?? 1) - 1], [defaultCard?.accountData?.cardMonth, preferredLocale]);