make getAccounts a simple web3 wrapper.

Maybe could even be like Test.prototype.getAccounts = web3.eth.getAccounts; ?
This commit is contained in:
Ricardo Guilherme Schmidt 2018-05-18 20:44:14 -03:00 committed by GitHub
parent 0ff5930427
commit 56b20becfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,10 +52,7 @@ var Test = function(options) {
Test.prototype.getAccounts = function(cb) {
this.web3.eth.getAccounts(function(err, accounts) {
if (err) {
throw new Error(err);
}
cb(accounts);
cb(err, accounts);
});
};