Skip to content

Commit 694ecf8

Browse files
committed
Change in number format to fix loss of precision for very big values
1 parent e562224 commit 694ecf8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ui/pages/confirmations/components/simulation-details/formatAmount.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export function formatAmount(locale: string, amount: BigNumber): string {
8080
MAX_SIGNIFICANT_DECIMAL_PLACES - digitsLeftOfDecimal + 1,
8181
);
8282

83-
return new Intl.NumberFormat(locale, {
84-
maximumFractionDigits,
85-
} as Intl.NumberFormatOptions).format(amount.toNumber());
83+
return amount.toFormat(maximumFractionDigits);
84+
// return new Intl.NumberFormat(locale, {
85+
// maximumFractionDigits,
86+
// } as Intl.NumberFormatOptions).format(amount.toNumber());
8687
}

0 commit comments

Comments
 (0)