callback fixes and get rid of resolver interface

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-06-18 14:31:22 -05:00 committed by Iuri Matias
parent acc672944e
commit 88133b01a9
3 changed files with 4 additions and 14 deletions

View File

@ -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);
}

View File

@ -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);
};

View File

@ -20,7 +20,7 @@ class ENS {
address: contract.deployedAddress
};
self.addSetProvider(config);
return cb();
cb();
});
});
}