Merge pull request #442 from 3esmit/patch-2
make getAccounts a simple web3..eth.getAccounts wrapper.
This commit is contained in:
commit
2271643015
|
@ -52,10 +52,7 @@ var Test = function(options) {
|
||||||
|
|
||||||
Test.prototype.getAccounts = function(cb) {
|
Test.prototype.getAccounts = function(cb) {
|
||||||
this.web3.eth.getAccounts(function(err, accounts) {
|
this.web3.eth.getAccounts(function(err, accounts) {
|
||||||
if (err) {
|
cb(err, accounts);
|
||||||
throw new Error(err);
|
|
||||||
}
|
|
||||||
cb(accounts);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue