From e554fa5d337ae214291f0f10c9d2d4466a5a66ec Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 26 Dec 2018 11:41:17 -0500 Subject: [PATCH] move txrunner config options to instance initialization --- src/universal-dapp.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 4fff562743..6728ec7a23 100644 --- a/src/universal-dapp.js +++ b/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