fix new significantFigures behavior

* fixes #34
This commit is contained in:
Matthias Kretschmann 2024-08-06 22:01:43 +01:00
parent 4b2138bca3
commit 3b6274d9af
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import { TokenLogo } from '@/components'
import { useLocale } from '@/features/prices'
import { formatCrypto, formatFiat } from '@/lib'
import type { Token } from '@/types'
import { ArrowRightIcon } from '@radix-ui/react-icons'
import styles from './Result.module.css'
type Props = {

View File

@ -3,7 +3,7 @@ import { formatCurrency } from '@coingecko/cryptoformat'
export function formatCrypto(price: number, currency: string, locale: string) {
return formatCurrency(price, currency, locale, false, {
decimalPlaces: 3,
significantFigures: 1
significantFigures: 5
})
}