Skip to content

Commit

Permalink
ensure native token is formatted according to coinDecimals
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Oct 28, 2024
1 parent b2ea1ad commit 688b503
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/features/EthWallet/contexts/EthWalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export const EthWalletContextProvider: React.FC<{ children: ReactNode }> = ({

// get balance using ethers
const balance = await ethersProvider.getBalance(address);
const formattedBalance = formatBalance(balance.toString());
const formattedBalance = formatBalance(
balance.toString(),
defaultChain.currencies[0].coinDecimals,
);
const userAccount: UserAccount = {
address: address,
balance: formattedBalance,
Expand Down

0 comments on commit 688b503

Please sign in to comment.