Skip to content

Commit c30a289

Browse files
committed
handle error if no accounts are found
1 parent a7d6d36 commit c30a289

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/deploy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
109109
var contractParams = (params || contract.args).slice();
110110

111111
this.web3.eth.getAccounts(function(err, accounts) {
112-
//console.log("using address" + this.web3.eth.accounts[0]);
112+
if (err) {
113+
return callback(new Error(err));
114+
}
113115

114116
// TODO: probably needs to be defaultAccount
115117
// TODO: it wouldn't necessary be the first address

0 commit comments

Comments
 (0)