Skip to content

Commit 1200d80

Browse files
committed
bug: handle formatter getting scientific notation
1 parent 7da4328 commit 1200d80

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",
6+
"packageManager": "yarn@1.22.22",
67
"homepage": "stakecore.org",
78
"scripts": {
89
"dev": "vite",

src/utils/misc/formatter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export namespace Formatter {
1212
export function number(value: intish, length = NUMBER_DISPLAY_LENGTH, decimals = 0): string {
1313
let str = value.toString()
1414

15+
if (str.includes('e')) {
16+
str = Number(str).toFixed(9)
17+
}
18+
1519
let prefix = ''
1620
if (str.startsWith('-')) {
1721
prefix = '-'

0 commit comments

Comments
 (0)