MetaMask / MetaMask/metamask-extension

window.ethereum.selectedAddress is not checksummed

Open
#12,348 1 comment 0 reactions 0 assignees View on GitHub
type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Describe the bug**
window.ethereum.selectedAddress has an output in lowercase, while the displayed wallet address in the UI (including when you copy it to a clipboard) is in mixed case. While this is fine for web3 apps that are not case sensitive, it is not the case for identity applications where the wallet address acts as a unique username. This leads to failure in login because the username doesn't match, e.g. implementation with Eauth wallet login (Eauth is an OAuth2 authentication server: https://github.com/pelith/node-eauth-server ).

**Steps to reproduce (REQUIRED)**
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

1. Connect the MetaMask
2. On browser console, check the output of window.ethereum.selectedAddress; and notice it is in small case
3. Click the MetaMask extension badge and copy the wallet address to clipboard; notice the copied address is in mixed case

**Expected behavior**
Both output should match.

**Browser details (please complete the following information):**
- OS: Any
- Hardware Wallet: Any
- Browser: Any
- MetaMask Version: 10.2.2

Contributor guide

Open the contributing guide

Research direction

Start at the window.ethereum.selectedAddress provider entry point and trace how the exposed address is produced, comparing it with the extension's copied wallet address. Reproduce the mismatch using the listed browser-console steps, then verify that both outputs match and run the relevant provider tests if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.