make correct representation of decimals in bigint
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
f34d53a936
commit
9ab91c801d
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ghost-lite",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "Web application for Ghost and Casper chain.",
|
||||
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
||||
"maintainers": [
|
||||
|
@ -85,8 +85,7 @@ const Item: React.FC<ItemProps> = (props) => {
|
||||
if (!value || !decimals) {
|
||||
return parseFloat("0").toFixed(5)
|
||||
}
|
||||
const power = Math.pow(10, decimals)
|
||||
const number = Number(value / BigInt(power))
|
||||
const number = Number(value) / Math.pow(10, decimals)
|
||||
return parseFloat(number.toString()).toFixed(5)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user