From 9ab91c801dff04c87406a936b4344cc887a2e4bc Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Thu, 21 Aug 2025 16:21:51 +0300 Subject: [PATCH] make correct representation of decimals in bigint Signed-off-by: Uncle Fatso --- package.json | 2 +- src/containers/Nominations.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 98d20ba..1d8ed6a 100644 --- a/package.json +++ b/package.json @@ -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 ", "maintainers": [ diff --git a/src/containers/Nominations.tsx b/src/containers/Nominations.tsx index d60ffc7..26203df 100644 --- a/src/containers/Nominations.tsx +++ b/src/containers/Nominations.tsx @@ -85,8 +85,7 @@ const Item: React.FC = (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) }