1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-07-01 06:11:43 +02:00

workaround for fiat decimals

* addresses #70
This commit is contained in:
Matthias Kretschmann 2020-09-10 17:23:10 +02:00
parent 804cb3c7f1
commit 85b0643693
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 6 additions and 1 deletions

View File

@ -96,6 +96,7 @@
min-height: 0;
display: inline-block;
vertical-align: middle;
margin-top: -2px;
}
.radio::after,

View File

@ -41,7 +41,11 @@ export default function Conversion({
const values = data[tokenId]
const fiatValue = values[currency.toLowerCase()]
const converted = fiatValue * Number(price)
setPriceConverted(`${formatCurrency(converted, currency, undefined, true)}`)
const convertedFormatted = Number(
formatCurrency(converted, currency, undefined, true)
).toFixed(2)
setPriceConverted(`${convertedFormatted}`)
}
useEffect(() => {