Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Update components/swap.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
fadeev and coderabbitai[bot] authored Jul 4, 2024
1 parent 84f3898 commit f2ca1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const roundToSignificantDigits = (
if (value === 0) return 0
const digits =
-Math.floor(Math.log10(Math.abs(value))) + (significantDigits - 1)
const factor = Math.pow(10, digits)
const factor = 10 ** digits
return Math.round(value * factor) / factor
}

Expand Down

0 comments on commit f2ca1e0

Please sign in to comment.