Skip to content

Commit

Permalink
fix(balance-estimation): use floor method for rounding down estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
AricRedemption committed Apr 10, 2024
1 parent 9a3c78e commit 46cf547
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const prettifyTokenBalance = (balance: number, decimal: number, useRound
// If useRound is true, then round the balance
let numberPart
if (useRound) {
const roundedBalance = Math.round(balance / 10 ** decimal)
const roundedBalance = Math.floor(balance / 10 ** decimal)
if (roundedBalance === 0) {
numberPart = '< 1'
} else {
Expand Down

0 comments on commit 46cf547

Please sign in to comment.