From 11ff70b7d013babe1296f6cd3569c169342b053b Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Fri, 20 Oct 2023 17:55:32 +0700 Subject: [PATCH] improve: decimals trade price --- src/components/swapv2/TradePrice.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/swapv2/TradePrice.tsx b/src/components/swapv2/TradePrice.tsx index be8b493881..f9c2244083 100644 --- a/src/components/swapv2/TradePrice.tsx +++ b/src/components/swapv2/TradePrice.tsx @@ -24,7 +24,7 @@ export default function TradePrice({ price, label, icon, style = {}, color }: Tr const [showInverted, setShowInverted] = useState(false) let formattedPrice try { - formattedPrice = formatDisplayNumber(showInverted ? price?.invert() : price, { significantDigits: 7 }) + formattedPrice = formatDisplayNumber(showInverted ? price?.invert() : price, { fractionDigits: 4 }) } catch (error) {} const show = Boolean(price?.baseCurrency && price?.quoteCurrency && formattedPrice)