don't use floor on potentially negative numbers

This commit is contained in:
Tyler Shipe 2021-08-29 12:55:34 -04:00
parent 83037b722e
commit dde1555b69
3 changed files with 4 additions and 4 deletions

View File

@ -185,7 +185,7 @@ const BalancesTable = () => {
className={`px-6 py-3 whitespace-nowrap text-sm text-th-fgd-1`}
>
{floorToDecimal(
parseFloat(balance.net.floor().toFixed()),
parseFloat(balance.net.toFixed()),
tokenConfig.decimals
)}
</Td>

View File

@ -13,7 +13,7 @@ const DayHighLow = ({ high, low, latest }) => {
return (
<div className="pr-6">
<div className="text-center text-th-fgd-3 tiny-text pb-0.5">
24h Range
Daily Range
</div>
<div className="flex items-center">
<div className="pr-2 text-th-fgd-1 text-xs">

View File

@ -153,7 +153,7 @@ const MarketHeader = () => {
</div>
</div>
<div className="pr-4">
<div className="text-th-fgd-3 tiny-text pb-0.5">24h Change</div>
<div className="text-th-fgd-3 tiny-text pb-0.5">Daily Change</div>
{change || change === 0 ? (
<div
className={`font-semibold text-xs ${
@ -171,7 +171,7 @@ const MarketHeader = () => {
)}
</div>
<div className="pr-6">
<div className="text-th-fgd-3 tiny-text pb-0.5">24h Vol</div>
<div className="text-th-fgd-3 tiny-text pb-0.5">Daily Vol</div>
<div className="font-semibold text-th-fgd-1 text-xs">
{ohlcv && !loading && volume ? (
volume !== '--' ? (