Skip to content

Commit

Permalink
fix: only forceDecimals if > 0.99 in dynamicNumeralFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Jan 7, 2025
1 parent e1f4343 commit 72246ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mrgn-common/src/utils/formatters.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const dynamicNumeralFormatter = (value: number, options: dynamicNumeralFo
}

if (Math.abs(value) >= 0.01) {
return numeral(value).format(forceDecimals ? "0,0.00a" : "0,0.[0000]a");
return numeral(value).format(forceDecimals && Math.abs(value) > 0.99 ? "0,0.00a" : "0,0.[0000]a");
}

if (tokenPrice) {
Expand Down

0 comments on commit 72246ce

Please sign in to comment.