From ac97dbe0a09ab1a237b9ef1a1aee832302770950 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 21 Oct 2024 11:52:58 +0200 Subject: [PATCH 1/2] fix: increase fractional and significant digits --- packages/widget/src/utils/format.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/widget/src/utils/format.ts b/packages/widget/src/utils/format.ts index bdb2480ef..abb7a6c5f 100644 --- a/packages/widget/src/utils/format.ts +++ b/packages/widget/src/utils/format.ts @@ -5,13 +5,13 @@ const subscriptMap = ['₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', ' export const precisionFormatter = new Intl.NumberFormat('en', { notation: 'standard', roundingPriority: 'morePrecision', - maximumSignificantDigits: 4, - maximumFractionDigits: 4, + maximumSignificantDigits: 5, + maximumFractionDigits: 5, useGrouping: false, }) /** - * Format token amount to at least 4 decimals. + * Format token amount to at least 5 decimals. * @param amount amount to format. * @returns formatted amount. */ From e366b3c55e1ae36a306f29299286c4ab5e9d5f4f Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 21 Oct 2024 12:00:10 +0200 Subject: [PATCH 2/2] fix: use 6 digits --- packages/widget/src/utils/format.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/widget/src/utils/format.ts b/packages/widget/src/utils/format.ts index abb7a6c5f..addde12ef 100644 --- a/packages/widget/src/utils/format.ts +++ b/packages/widget/src/utils/format.ts @@ -5,13 +5,13 @@ const subscriptMap = ['₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', ' export const precisionFormatter = new Intl.NumberFormat('en', { notation: 'standard', roundingPriority: 'morePrecision', - maximumSignificantDigits: 5, - maximumFractionDigits: 5, + maximumSignificantDigits: 6, + maximumFractionDigits: 6, useGrouping: false, }) /** - * Format token amount to at least 5 decimals. + * Format token amount to at least 6 decimals. * @param amount amount to format. * @returns formatted amount. */