Initialize web3 provider before deployAll

This makes possible to load accounts before deploying the contracts.
This commit is contained in:
Ricardo Guilherme Schmidt 2018-05-16 19:40:24 -03:00 committed by GitHub
parent 01ae387c74
commit bfcf72b09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -41,17 +41,17 @@ var Test = function(options) {
});
this.web3 = new Web3();
};
Test.prototype.deployAll = function(contractsConfig, cb) {
var self = this;
if (this.simOptions.node) {
this.web3.setProvider(new this.web3.providers.HttpProvider(this.simOptions.node));
} else {
this.sim = getSimulator();
this.web3.setProvider(this.sim.provider(this.simOptions));
}
};
Test.prototype.deployAll = function(contractsConfig, cb) {
var self = this;
async.waterfall([
function getConfig(callback) {