Skip to content

Commit

Permalink
feat: set maximum fraction digits when formatting numbers (#2071)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo authored Dec 7, 2023
1 parent 84c8b43 commit 8987481
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webapp/src/components/AssetCard/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { getMinimumValueForFractionDigits } from '../../lib/mana'
import { BrowseOptions, SortBy } from '../../modules/routing/types'
import { Mana } from '../Mana'

const formatter = Intl.NumberFormat('en', { notation: 'compact' })
const formatter = Intl.NumberFormat('en', {
notation: 'compact',
maximumFractionDigits: 2
})

export function formatWeiToAssetCard(wei: string): string {
const maximumFractionDigits = MAXIMUM_FRACTION_DIGITS
Expand Down

0 comments on commit 8987481

Please sign in to comment.