@@ -37,14 +37,10 @@ describe('formatAmount', () => {
37
37
[ 47361034.006 , '47,361,034' ] ,
38
38
[ '12130982923409.5' , '12,130,982,923,410' ] ,
39
39
[ '1213098292340944.5' , '1,213,098,292,340,945' ] ,
40
- // Precision is lost after the value is greator than Number.MAX_SAFE_INTEGER. The digits after
41
- // the 15th digit become 0's.
42
- // TODO fix the precision
43
- /** @see {@link https://github.com/MetaMask/metamask-extension/issues/25755 } */
44
- [ '30001231231212312138768' , '30,001,231,231,212,312,000,000' ] ,
40
+ [ '30001231231212312138768' , '30,001,231,231,212,312,138,768' ] ,
45
41
[
46
- '115792089237316195423570985008687907853269984665640564039457584007913129639935 ' ,
47
- '115,792,089,237,316,200,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ' ,
42
+ '1157920892373161954235709850086879078532699846656405640394575.84007913129639935 ' ,
43
+ '1,157,920,892,373,161,954,235,709,850,086,879,078,532,699,846,656,405,640,394,576 ' ,
48
44
] ,
49
45
] ) (
50
46
'formats amount greater than or equal to 1 with appropriate decimal precision (%s => %s)' ,
0 commit comments