Skip to content

Commit

Permalink
feat: improve markets page (#509)
Browse files Browse the repository at this point in the history
* feat: ✨ change fiat formatting

changed fiat formatting from compact to expand inside exchange billboards.

* feat: ✨ improve market sparkline cache

* feat: ✨ improve chain revenue cache
  • Loading branch information
DavideSegullo authored May 8, 2024
1 parent 1dd21be commit 5a072c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/hooks/usePerpetualMarketSparklines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const usePerpetualMarketSparklines = (props: UsePerpetualMarketSparklines
},
refetchInterval,
refetchOnWindowFocus: false,
cacheTime: 1_000 * 60 * 5, // 5 minutes
staleTime: 1_000 * 60 * 10, // 10 minutes
});

return data;
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/usePerpetualMarketsStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const usePerpetualMarketsStats = () => {
}
},
refetchOnWindowFocus: false,
cacheTime: 1_000 * 60 * 5, // 5 minutes
staleTime: 1_000 * 60 * 10, // 10 minutes
});

const feesEarned = useMemo(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/views/ExchangeBillboards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ export const ExchangeBillboards: React.FC<ExchangeBillboardsProps> = ({ classNam
tagKey: STRING_KEYS._24H,
value: volume24HUSDC || undefined,
fractionDigits: 0,
type: OutputType.CompactFiat,
type: OutputType.Fiat,
},
{
key: 'open-interest',
labelKey: STRING_KEYS.OPEN_INTEREST,
tagKey: STRING_KEYS.CURRENT,
value: openInterestUSDC || undefined,
fractionDigits: 0,
type: OutputType.CompactFiat,
type: OutputType.Fiat,
},
{
key: 'fee-earned-stakers',
labelKey: STRING_KEYS.EARNED_BY_STAKERS,
tagKey: STRING_KEYS._24H,
value: feesEarned,
type: OutputType.CompactFiat,
type: OutputType.Fiat,
chartData: feesEarnedChart,
linkLabelKey: STRING_KEYS.LEARN_MORE_ARROW,
link: `${chainTokenLabel}/${TokenRoute.StakingRewards}`,
Expand Down

0 comments on commit 5a072c1

Please sign in to comment.