Pass web3 as params

This commit is contained in:
Anthony Laibe 2018-08-29 09:59:39 +01:00
parent 0a261b050d
commit b9944b18d2
1 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ __embarkENS.resolve = function (name, callback) {
if (resolverAddress === voidAddress) { if (resolverAddress === voidAddress) {
return cb('Name not yet registered'); return cb('Name not yet registered');
} }
let resolverContract = new EmbarkJS.Contract({abi: this.resolverInterface, address: resolverAddress}); let resolverContract = new EmbarkJS.Contract({abi: this.resolverInterface, address: resolverAddress, web3: web3});
resolverContract.methods.addr(node).call(cb); resolverContract.methods.addr(node).call(cb);
}); });
}; };
@ -221,7 +221,7 @@ __embarkENS.lookup = function (address, callback) {
if (resolverAddress === voidAddress) { if (resolverAddress === voidAddress) {
return cb('Address not associated to a resolver'); return cb('Address not associated to a resolver');
} }
let resolverContract = new EmbarkJS.Contract({abi: this.resolverInterface, address: resolverAddress}); let resolverContract = new EmbarkJS.Contract({abi: this.resolverInterface, address: resolverAddress, web3: web3 });
resolverContract.methods.name(node).call(cb); resolverContract.methods.name(node).call(cb);
}); });
}; };