Skip to content

Commit 7c87f4c

Browse files
committed
fix: consistent sgho on banner and reserve values
1 parent dff988f commit 7c87f4c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/modules/markets/Gho/GhoBanner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
3333
Stake.gho
3434
);
3535

36-
const totalStakedUsd = stakeGeneralResult?.[0]?.totalSupplyUSDFormatted;
36+
const stakeData = stakeGeneralResult?.[0];
3737

3838
if (downToSm) {
3939
return <GhoSavingsBannerMobile reserve={reserve} />;
@@ -113,15 +113,15 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
113113
}}
114114
/>
115115
<Stack direction="column" alignItems="flex-start">
116-
{stakeDataLoading ? (
116+
{stakeDataLoading || !stakeData ? (
117117
<Skeleton width={70} height={25} />
118118
) : (
119119
<Stack direction="row" gap={1} alignItems="center">
120120
<FormattedNumber
121121
symbol="USD"
122122
compact
123123
variant={isCustomBreakpoint ? 'h3' : isMd ? 'secondary16' : 'secondary14'}
124-
value={totalStakedUsd || 0}
124+
value={stakeData.totalSupplyFormatted || 0}
125125
/>
126126
</Stack>
127127
)}

src/modules/reserve-overview/Gho/SavingsGho.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ export const SavingsGho = () => {
8686
{stakeDataLoading && <Skeleton variant="text" width={145} height={24} />}
8787
{!stakeDataLoading && stakeData && (
8888
<Stack direction="row" alignItems="center" gap={1}>
89-
<FormattedNumber value={stakeData.totalSupplyFormatted} variant="main16" compact />
89+
<FormattedNumber
90+
value={stakeData.totalSupplyFormatted || 0}
91+
variant="main16"
92+
compact
93+
/>
9094
<Box sx={{ display: { xs: 'none', sm: 'block' } }}>
9195
{' ('}
9296
<FormattedNumber

0 commit comments

Comments
 (0)