fix(@embark/ens): fix trying to resolve when ENS is not registered

This commit is contained in:
Jonathan Rainville 2019-10-28 11:39:41 -04:00 committed by Michael Bradley
parent 8fee0b8ccc
commit 1302f9fb48
1 changed files with 6 additions and 0 deletions

View File

@ -389,10 +389,16 @@ class ENS {
}
ensResolve(name, cb) {
if (!this.ensContract) {
return cb(__('ENS not registered for this configuration'));
}
ENSFunctions.resolveName(name, this.ensContract, this.createResolverContract.bind(this), cb, namehash);
}
ensLookup(address, cb) {
if (!this.ensContract) {
return cb(__('ENS not registered for this configuration'));
}
ENSFunctions.lookupAddress(address, this.ensContract, namehash, this.createResolverContract.bind(this), cb);
}