show gainers/losers when db is down

This commit is contained in:
saml33 2023-12-30 23:47:09 +11:00
parent 0bac0589d9
commit 10aaa71dd6
2 changed files with 2 additions and 3 deletions

View File

@ -96,8 +96,7 @@ const RecentGainersLosers = () => {
return [[], []] return [[], []]
const tradeableAssets = [] const tradeableAssets = []
for (const token of banksWithMarketData) { for (const token of banksWithMarketData) {
const volume = token.market?.marketData?.quote_volume_24h || 0 if (token.market?.quoteTokenIndex === 0) {
if (token.market?.quoteTokenIndex === 0 && volume > 0) {
const change = token.market?.rollingChange || 0 const change = token.market?.rollingChange || 0
tradeableAssets.push({ bank: token.bank, change, type: 'spot' }) tradeableAssets.push({ bank: token.bank, change, type: 'spot' })
} }

View File

@ -294,7 +294,7 @@ const SpotTable = ({ tokens }: { tokens: BankWithMarketData[] }) => {
<Td> <Td>
<div className="flex flex-col text-right"> <div className="flex flex-col text-right">
<p> <p>
{!market ? ( {!market || !market?.marketData ? (
'' ''
) : volume ? ( ) : volume ? (
<span> <span>