Skip to content

Commit

Permalink
🩹 fix balance display off-by-one
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkac committed Sep 5, 2024
1 parent 1cfb252 commit 32c5f78
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const useScaffoldEthBalance = ({ address }: UseScaffoldEthBalanceProps) => {

const remainderStr = remainder
.toString()
.padStart(ethDecimals.toString().length, "0");
.padStart(ethDecimals.toString().length - 1, "0");
const decimalPart = remainderStr.slice(0, 4);

setBalance(`${integerPart}.${decimalPart}`);
Expand Down

0 comments on commit 32c5f78

Please sign in to comment.