Skip to content

Commit

Permalink
clean up numberFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Jun 6, 2024
1 parent e28a09b commit 21ade6a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/__swaps__/utils/swaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,7 @@ export function valueBasedDecimalFormatter({
// Format the number to add separators and trim trailing zeros
const numberFormatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: isStablecoin ? 2 : 0,
// eslint-disable-next-line no-nested-ternary
maximumFractionDigits: maximumFractionDigits(),
// maximumFractionDigits: !isNaN(decimalPlaces) ? (isStablecoin && decimalPlaces < 2 ? 2 : decimalPlaces) : 2, // Allow up to the required precision
useGrouping: true,
});

Expand Down

0 comments on commit 21ade6a

Please sign in to comment.