mirror of https://github.com/embarklabs/embark.git
callback fixes and get rid of resolver interface
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
parent
acc672944e
commit
88133b01a9
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ class ENS {
|
|||
address: contract.deployedAddress
|
||||
};
|
||||
self.addSetProvider(config);
|
||||
return cb();
|
||||
cb();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue