mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-27 05:56:21 +00:00
review comments
This commit is contained in:
parent
c64c093a48
commit
9e69a7257e
@ -2,7 +2,6 @@
|
||||
|
||||
let __embarkENS = {};
|
||||
|
||||
const NOT_REGISTERED_ERROR = 'Name not yet registered';
|
||||
// resolver interface
|
||||
__embarkENS.resolverInterface = [
|
||||
{
|
||||
@ -193,7 +192,7 @@ __embarkENS.resolve = function (name, callback) {
|
||||
return this.ens.methods.resolver(node).call()
|
||||
.then(resolverAddress => {
|
||||
if (resolverAddress === voidAddress) {
|
||||
return cb(NOT_REGISTERED_ERROR);
|
||||
return cb('Name not yet registered');
|
||||
}
|
||||
let resolverContract = new EmbarkJS.Blockchain.Contract({
|
||||
abi: this.resolverInterface,
|
||||
@ -202,9 +201,7 @@ __embarkENS.resolve = function (name, callback) {
|
||||
});
|
||||
return resolverContract.methods.addr(node).call(cb);
|
||||
})
|
||||
.catch(err => {
|
||||
cb(err);
|
||||
});
|
||||
.catch(cb);
|
||||
};
|
||||
|
||||
__embarkENS.lookup = function (address, callback) {
|
||||
@ -239,9 +236,7 @@ __embarkENS.lookup = function (address, callback) {
|
||||
});
|
||||
return resolverContract.methods.name(node).call(cb);
|
||||
})
|
||||
.catch(err => {
|
||||
cb(err);
|
||||
});
|
||||
.catch(cb);
|
||||
};
|
||||
|
||||
__embarkENS.registerSubDomain = function (name, address, callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user