fix coingecko % comparison

This commit is contained in:
tjs 2022-08-26 15:14:57 -04:00
parent 2ac137a05c
commit 6d60274fe2
1 changed files with 3 additions and 3 deletions

View File

@ -272,14 +272,14 @@ const JupiterRouteInfo = ({
coingeckoPrices?.inputCoingeckoPrice ? (
<div
className={`text-right ${
coinGeckoPriceDifference * 100 > 0
coinGeckoPriceDifference > 0
? 'text-th-red'
: 'text-th-green'
}`}
>
{Math.abs(coinGeckoPriceDifference * 100).toFixed(1)}%{' '}
{Math.abs(coinGeckoPriceDifference).toFixed(1)}%{' '}
<span className="text-th-fgd-4">{`${
coinGeckoPriceDifference * 100 <= 0
coinGeckoPriceDifference <= 0
? 'cheaper'
: 'more expensive'
} than CoinGecko`}</span>