1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

better number fallbacks

This commit is contained in:
Matthias Kretschmann 2020-08-26 09:42:11 +02:00
parent 2a8f045efa
commit c6307c24bd
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,8 @@ export default function PriceUnit({
<div className={styleClasses}>
{Number.isInteger(Number(price))
? price
: Number.isNaN(Number(price))
? '-'
: formatCurrency(Number(price), '', undefined, false, true)}{' '}
<span>{symbol || 'OCEAN'}</span>
{conversion && <Conversion price={price} />}

View File

@ -76,7 +76,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
(Number(poolTokens) / Number(totalPoolTokens)) *
Number(oceanReserve)
}`,
dt: '0'
dt: '-'
}
setUserBalance(userBalance)