fund account only in dev
This commit is contained in:
parent
a1e3c741a0
commit
09cdab7e2b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue