Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Name empty, but ens owner #83

Open
thedarkknight197 opened this issue Jan 10, 2022 · 2 comments
Open

Name empty, but ens owner #83

thedarkknight197 opened this issue Jan 10, 2022 · 2 comments

Comments

@thedarkknight197
Copy link

thedarkknight197 commented Jan 10, 2022

Hello i can't resolve from my address, my ens domain.
I am using React.
This is my code:

import ENS from '@ensdomains/ensjs'

async getENS(address){
        var Web3 = require('web3');
        var provider= new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/key");
        var ens = new ENS({provider,  ensAddress: '0x314159265dd8dbb310642f98f50c066173c1259b' });

        console.log(await ens.getName(address));
}

The result is:
{name: null}

What's the problem?

@Uysim
Copy link

Uysim commented Jan 20, 2022

I am facing the same problem
Maybe because of this line getNameWithResolver.
I don't why we need parseInt(resolverAddr, 16) === 0 condition

@Uysim
Copy link

Uysim commented Jan 21, 2022

@thedarkknight197 I solved it by set primary ens.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants