Skip to content

Commit

Permalink
Fix balance display off-by-one (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkac authored Sep 6, 2024
1 parent 1cfb252 commit 2620230
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 2620230

Please sign in to comment.