Summary
fetchWalletBalance in src/utils/walletHelpers.ts accepts an address with no checksum or EIP-55 validation.
Affected area
src/utils/walletHelpers.ts and consumers: useWalletConnector, src/components/WalletConnectedView.tsx
Steps to reproduce / impact
Sending an invalid or mixed-case address may produce balance lookups against wrong accounts. Worse, in some chains EIP-55 checksum mismatch can indicate a typo-targeted phishing attempt.
Expected behaviour
Before reusing the address for any provider call, validate with viem getAddress or ethers utils.getAddress, which normalises and validates the checksum.
Acceptance criteria
Summary
fetchWalletBalanceinsrc/utils/walletHelpers.tsaccepts an address with no checksum or EIP-55 validation.Affected area
src/utils/walletHelpers.tsand consumers:useWalletConnector,src/components/WalletConnectedView.tsxSteps to reproduce / impact
Sending an invalid or mixed-case address may produce balance lookups against wrong accounts. Worse, in some chains EIP-55 checksum mismatch can indicate a typo-targeted phishing attempt.
Expected behaviour
Before reusing the address for any provider call, validate with
viemgetAddressor ethersutils.getAddress, which normalises and validates the checksum.Acceptance criteria
assertValidAddress(addr: string): stringinwalletHelpers.ts.