fund account only in dev

This commit is contained in:
Jonathan Rainville 2018-05-18 09:46:39 -04:00
parent a1e3c741a0
commit 09cdab7e2b
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ class Provider {
this.accountsConfig = options.accountsConfig;
this.web3Endpoint = options.web3Endpoint;
this.logger = options.logger;
this.isDev = options.isDev;
this.engine = new ProviderEngine();
this.asyncMethods = {};
}
@ -38,6 +39,9 @@ class Provider {
if (!self.accounts.length) {
return next(NO_ACCOUNTS);
}
if (!self.isDev) {
return next();
}
async.each(self.accounts, (account, eachCb) => {
fundAccount(self.web3, account.address, eachCb);
}, next);

View File

@ -40,7 +40,7 @@ class Engine {
}, 0);
if (this.interceptLogs || this.interceptLogs === undefined) {
this.doInterceptLogs();
// this.doInterceptLogs();
}
}
@ -284,6 +284,7 @@ class Engine {
web3: this.web3,
accountsConfig: this.config.contractsConfig.deployment.accounts,
logger: this.logger,
isDev: this.isDev,
web3Endpoint
};
provider = new Provider(providerOptions);