MetaMask / MetaMask/metamask-extension

Unable to resolve certain ENS-registered addresses

Open
#8,230 5 comments 1 reaction 0 assignees View on GitHub
area-name-systems type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Description**
While MetaMask can resolve `.eth` domains typed in the address bar of browsers, and retrieve/display content registered to `.eth` addresses, this does not seem to work for `.xyz`, an ENS-supported TLD.

**To Reproduce:**
Unfortunately, my only evidence is anecdotal: I registered onion content on a subdomain of a `xyz` domain, and it won't load.

1. Ensuring MetaMask is installed and unlocked, attempt to resolve `onion.wschwab.xyz` in the address bar of a browser that can visit a `onion` website, most likely Tor.
2. You can verify the content is indeed linked in ENS [here](https://app.ens.domains/name/onion.wschwab.xyz), and can even click on the content in Tor to see that it displays properly.

**Expected behavior**
The address should resolve to the linked content as registered in ENS.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Browser details (please complete the following information):**
- OS: Linux
- Browser Tor 9.0.6, 9.0.7
- MetaMask latest

**Additional context (Error Messages, etc.)**
I originally thought this might be an issue with resolving v3 onion addresses, but is not, as the [CIA](http://ciadotgov4sjwlzihbbgxnqg3xiyrg7so2r2o3lt5wz5ypk4sxyjstad.onion) link resolves normally when using the ENS link (ciagovtor.eth).

I suspect the issue is [this](https://github.com/MetaMask/metamask-extension/blob/develop/app/scripts/lib/ens-ipfs/setup.js#L5) line of code from /app/scripts//lib/ens-ipfs/setup.js :
```
const supportedTopLevelDomains = ['eth']
```
I've only started looking through the codebase today, but I suspect from this line that MetaMask will only resolve `.eth` addresses, whereas the address I was attempting to resolve is a `.xyz` address. If I'm right, the solution should be as simple as adding other supported TLDs to the `supportedTopLevelDomains` array. I'd make a PR, but I feel a bit weird doing so without checking in with you all first to see if I totally missed the boat on this.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with app/scripts/lib/ens-ipfs/setup.js, especially the supportedTopLevelDomains definition, and trace how the address bar input is resolved. Reproduce the issue with onion.wschwab.xyz in Tor and compare it with ciagovtor.eth. Done means the ENS-linked content for the reported .xyz address resolves as expected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.