Skip to content

Commit

Permalink
Correct the AccountOverview.OverviewsResponse TS interface `account…
Browse files Browse the repository at this point in the history
…` type to show it is nullable (#7921)

Co-authored-by: Shendy <[email protected]>
  • Loading branch information
Jinksi and shendy-a8c authored Dec 18, 2023
1 parent cc42940 commit 63e3d2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: No changelog entry required – minor TS interface fix with no user-facing changes


2 changes: 1 addition & 1 deletion client/components/account-balances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
} )
);
Expand Down
2 changes: 1 addition & 1 deletion client/overview/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useSelectedCurrency = (): UseSelectedCurrencyResult => {
};

type SelectedCurrencyOverview = {
account?: AccountOverview.Account;
account?: AccountOverview.Account | null;
overview?: AccountOverview.Overview;
isLoading: boolean;
};
Expand Down
4 changes: 2 additions & 2 deletions client/types/account-overview.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export interface Overview {

export interface OverviewsResponse {
overviews: {
account: Account;
currencies: Array< Overview >;
account: Account | null;
currencies: Overview[];
};
isLoading: boolean;
}

0 comments on commit 63e3d2d

Please sign in to comment.