From 3b6274d9afd5ff0c6efa0e0d53fe3bd0e34841f9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 6 Aug 2024 22:01:43 +0100 Subject: [PATCH] fix new significantFigures behavior * fixes #34 --- features/strategies/components/Result/Result.tsx | 1 - lib/numbers.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/features/strategies/components/Result/Result.tsx b/features/strategies/components/Result/Result.tsx index 0df73b1..f1cadcf 100644 --- a/features/strategies/components/Result/Result.tsx +++ b/features/strategies/components/Result/Result.tsx @@ -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 = { diff --git a/lib/numbers.ts b/lib/numbers.ts index 92bbe6d..1a1cdc0 100644 --- a/lib/numbers.ts +++ b/lib/numbers.ts @@ -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 }) }