show gainers/losers when db is down
This commit is contained in:
parent
0bac0589d9
commit
10aaa71dd6
|
@ -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' })
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue