From 88133b01a96efd54f70b6419ae8f030343982a1c Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Mon, 18 Jun 2018 14:31:22 -0500 Subject: [PATCH] callback fixes and get rid of resolver interface Signed-off-by: VoR0220 --- lib/modules/ens/contracts/ResolverInterface.sol | 10 ---------- lib/modules/ens/embarkjs.js | 6 +++--- lib/modules/ens/index.js | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 lib/modules/ens/contracts/ResolverInterface.sol diff --git a/lib/modules/ens/contracts/ResolverInterface.sol b/lib/modules/ens/contracts/ResolverInterface.sol deleted file mode 100644 index 006bf2013..000000000 --- a/lib/modules/ens/contracts/ResolverInterface.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma solidity ^0.4.18; - -contract ResolverInterface { - function PublicResolver(address ensAddr) public; - function setAddr(bytes32 node, address addr) public; - function setHash(bytes32 node, bytes32 hash) public; - function addr(bytes32 node) public view returns (address); - function hash(bytes32 node) public view returns (bytes32); - function supportsInterface(bytes4 interfaceID) public pure returns (bool); -} diff --git a/lib/modules/ens/embarkjs.js b/lib/modules/ens/embarkjs.js index 7e71ea8cc..0ed09e551 100644 --- a/lib/modules/ens/embarkjs.js +++ b/lib/modules/ens/embarkjs.js @@ -214,8 +214,8 @@ __embarkENS.lookup = function (address, cb) { return resolverContract.methods.name(node).call(); }).then((name) => { if (name === "" || name === undefined) { - cb(new Error("Name not found"), null); + return cb(new Error("Name not found")); } - cb(null, name); - }).catch(err => cb(err)); + return cb(null, name); + }).catch(cb); }; diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index 9cca1345d..585c34bb1 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -20,7 +20,7 @@ class ENS { address: contract.deployedAddress }; self.addSetProvider(config); - return cb(); + cb(); }); }); }