handle error if no accounts are found

This commit is contained in:
Iuri Matias 2016-10-30 19:14:38 -04:00
parent a7d6d36506
commit c30a289945
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
var contractParams = (params || contract.args).slice();
this.web3.eth.getAccounts(function(err, accounts) {
//console.log("using address" + this.web3.eth.accounts[0]);
if (err) {
return callback(new Error(err));
}
// TODO: probably needs to be defaultAccount
// TODO: it wouldn't necessary be the first address