if any account is configured in blockchain.json then use it as the default account for deploying contracts

This commit is contained in:
Iuri Matias 2017-03-04 19:17:39 -05:00
parent 18c299fa3a
commit 16275f13e5
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ DeployManager.prototype.deployContracts = function(done) {
if (err) { if (err) {
return callback(new Error(err)); return callback(new Error(err));
} }
web3.eth.defaultAccount = accounts[0]; var selectedAccount = self.config.blockchainConfig.account.address;
web3.eth.defaultAccount = (selectedAccount || accounts[0]);
var deploy = new Deploy({ var deploy = new Deploy({
web3: web3, web3: web3,