forked from mico/idle_moloch
Fixed a formatting bug
This commit is contained in:
parent
4bcf23a9ac
commit
eb318972b8
@ -41,7 +41,7 @@ export const toReadable = (value: bigint) => {
|
|||||||
return value.toString();
|
return value.toString();
|
||||||
} else {
|
} else {
|
||||||
const divided = value / suffixes[i - 1].value;
|
const divided = value / suffixes[i - 1].value;
|
||||||
const numStr = (value % suffixes[i - 0].value).toString().slice(0, 3);
|
const numStr = (value % suffixes[i - 1].value).toString().slice(0, 3);
|
||||||
const remainder = parseInt(numStr.replace(/0+$/, ''), 10);
|
const remainder = parseInt(numStr.replace(/0+$/, ''), 10);
|
||||||
return `${divided.toString()}.${remainder.toString()} ${suffixes[i - 1].suffix}`;
|
return `${divided.toString()}.${remainder.toString()} ${suffixes[i - 1].suffix}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user