diff --git a/package-lock.json b/package-lock.json index 3d6d967..058f259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "big.js": "^6.2.1", "copy-to-clipboard": "^3.3.3", "react": "^18.2.0", "react-chrome-extension-router": "^1.4.0", @@ -5071,11 +5072,15 @@ } }, "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", "engines": { "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" } }, "node_modules/binary-extensions": { @@ -11420,6 +11425,14 @@ "node": ">=8.9.0" } }, + "node_modules/loader-utils/node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "engines": { + "node": "*" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -20962,9 +20975,9 @@ } }, "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==" }, "binary-extensions": { "version": "2.2.0", @@ -25704,6 +25717,13 @@ "big.js": "^5.2.2", "emojis-list": "^3.0.0", "json5": "^2.1.2" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + } } }, "locate-path": { diff --git a/package.json b/package.json index f374921..41102d1 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "big.js": "^6.2.1", "copy-to-clipboard": "^3.3.3", "react": "^18.2.0", "react-chrome-extension-router": "^1.4.0", diff --git a/src/app/components/Header/Header.jsx b/src/app/components/Header/Header.jsx index e4b8e26..f978851 100644 --- a/src/app/components/Header/Header.jsx +++ b/src/app/components/Header/Header.jsx @@ -76,7 +76,7 @@ const Header = () => { )}
- {censorValue(wallet.balance.toFixed(2))} ZANO + {censorValue(Number(wallet.balance).toFixed(2))} ZANO
))} diff --git a/src/app/components/TokensTabs/Assets/Assets.jsx b/src/app/components/TokensTabs/Assets/Assets.jsx index 0d96ad7..d0d2780 100644 --- a/src/app/components/TokensTabs/Assets/Assets.jsx +++ b/src/app/components/TokensTabs/Assets/Assets.jsx @@ -30,7 +30,9 @@ const Assets = () => { return (
{state.wallet.assets.map((asset) => { - const fiatBalance = (asset.balance * state.priceData.price).toFixed(2); + const fiatBalance = ( + Number(asset.balance) * state.priceData.price + ).toFixed(2); return (
{/*