Skip to content

Commit

Permalink
improve: decimals trade price
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold committed Oct 20, 2023
1 parent cd45399 commit 11ff70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/swapv2/TradePrice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function TradePrice({ price, label, icon, style = {}, color }: Tr
const [showInverted, setShowInverted] = useState<boolean>(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)
Expand Down

0 comments on commit 11ff70b

Please sign in to comment.