diff --git a/changelog/fix-7920-correct-account-overview-account-type-nullable b/changelog/fix-7920-correct-account-overview-account-type-nullable new file mode 100644 index 00000000000..5db6d1382f4 --- /dev/null +++ b/changelog/fix-7920-correct-account-overview-account-type-nullable @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: No changelog entry required – minor TS interface fix with no user-facing changes + + diff --git a/client/components/account-balances/index.tsx b/client/components/account-balances/index.tsx index 712711ff869..132ebe349c9 100644 --- a/client/components/account-balances/index.tsx +++ b/client/components/account-balances/index.tsx @@ -115,7 +115,7 @@ const AccountBalances: React.FC = () => { currencyCode: overview.currency, availableFunds: overview.available?.amount ?? 0, pendingFunds: overview.pending?.amount ?? 0, - delayDays: account.deposits_schedule.delay_days, + delayDays: account?.deposits_schedule.delay_days ?? 0, instantBalance: overview.instant, } ) ); diff --git a/client/overview/hooks.ts b/client/overview/hooks.ts index 2eec7cb3dd0..7d4da197955 100644 --- a/client/overview/hooks.ts +++ b/client/overview/hooks.ts @@ -46,7 +46,7 @@ export const useSelectedCurrency = (): UseSelectedCurrencyResult => { }; type SelectedCurrencyOverview = { - account?: AccountOverview.Account; + account?: AccountOverview.Account | null; overview?: AccountOverview.Overview; isLoading: boolean; }; diff --git a/client/types/account-overview.d.ts b/client/types/account-overview.d.ts index 4291212c83f..cf0acd923c1 100644 --- a/client/types/account-overview.d.ts +++ b/client/types/account-overview.d.ts @@ -68,8 +68,8 @@ export interface Overview { export interface OverviewsResponse { overviews: { - account: Account; - currencies: Array< Overview >; + account: Account | null; + currencies: Overview[]; }; isLoading: boolean; }