move txrunner config options to instance initialization

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent edf77c0aae
commit e554fa5d33
  1. 10
      src/universal-dapp.js

@ -42,7 +42,15 @@ UniversalDApp.prototype.resetEnvironment = function () {
this._addAccount('71975fbf7fe448e004ac7ae54cad0a383c3906055a65468714156a07385e96ce', '0x56BC75E2D63100000')
executionContext.vm().stateManager.cache.flush(function () {})
}
this.txRunner = new TxRunner(this.accounts, this._txRunnerAPI)
this.txRunner = new TxRunner(this.accounts, {
config: this._deps.config,
detectNetwork: (cb) => {
executionContext.detectNetwork(cb)
},
personalMode: () => {
return this._deps.config.get('settings/personal-mode')
}
})
this.txRunner.event.register('transactionBroadcasted', (txhash) => {
executionContext.detectNetwork((error, network) => {
if (error || !network) return

Loading…
Cancel
Save