From 9e69a7257e1449fed8a780dd236c49bdbf0a10fd Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 28 Nov 2018 12:39:54 -0500 Subject: [PATCH] review comments --- src/lib/modules/ens/embarkjs.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lib/modules/ens/embarkjs.js b/src/lib/modules/ens/embarkjs.js index b94b1f1a1..2a38fb12e 100644 --- a/src/lib/modules/ens/embarkjs.js +++ b/src/lib/modules/ens/embarkjs.js @@ -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) {