diff --git a/lib/modules/swarm/process.js b/lib/modules/swarm/process.js index 3ebfce89..0ac013bb 100644 --- a/lib/modules/swarm/process.js +++ b/lib/modules/swarm/process.js @@ -25,18 +25,16 @@ class SwarmProcess extends ProcessWrapper { password = fs.dappPath(this.storageConfig.account.password); } // default to our blockchain config account, or our default account - else if (!this.blockchainConfig.isDev && - this.blockchainConfig.mineWhenNeeded && - this.blockchainConfig.account && + else if (this.blockchainConfig.account && (this.blockchainConfig.account.address || this.defaultAccount) && this.blockchainConfig.account.password ) { // defaultAccount is populated from blockchain_connector.determineDefaultAccount which is either // config/blockchain.js > account > address or the first address returned from web3.eth.getAccounts // (usually the default account) - bzzaccount = this.defaultAccount; + bzzaccount = this.blockchainConfig.account.address || this.defaultAccount; password = fs.dappPath(this.blockchainConfig.account.password); - console.trace(`Swarm account/password falling back to the blockchain account ${this.defaultAccount}. The account is either specified in config/blockchain.js > account > address or is the first address returned from web3.eth.getAccounts. The password is specified in config/blockchain.js > account > address.`); + console.trace(`Swarm account/password falling back to the blockchain account ${this.blockchainConfig.account.address || this.defaultAccount}. The account is either specified in config/blockchain.js > account > address or is the first address returned from web3.eth.getAccounts. The password is specified in config/blockchain.js > account > address.`); } else { return 'Account address and password are needed in the storage config to start the Swarm process';