From 961561b0cd7bc0822a220e8c2b0840bbc6a0472d Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Aug 2018 13:11:11 +0200 Subject: [PATCH] fix updating web reference --- src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js | 8 ++------ src/app/debugger/remix-debugger/src/ui/TxBrowser.js | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js b/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js index 6111dfa3a5..99b7d19d6f 100644 --- a/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js +++ b/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js @@ -43,11 +43,7 @@ function EthdebuggerUI (opts) { self.updateWeb3Reference() }) - setTimeout(function () { - self.updateWeb3Reference() - }, 10000) - - this.txBrowser = new TxBrowser(this, {displayConnectionSetting: false}) + this.txBrowser = new TxBrowser(this, {displayConnectionSetting: false, web3: executionContext.web3()}) this.txBrowser.event.register('newTxLoading', this, function () { self.unLoad() }) @@ -69,7 +65,7 @@ EthdebuggerUI.prototype.get_web3 = function () { EthdebuggerUI.prototype.updateWeb3Reference = function () { if (!this.txBrowser) return - this.txBrowser.web3 = this.debugger.web3 + this.txBrowser.web3 = executionContext.web3() } EthdebuggerUI.prototype.setCompilationResult = function (compilationResult) { diff --git a/src/app/debugger/remix-debugger/src/ui/TxBrowser.js b/src/app/debugger/remix-debugger/src/ui/TxBrowser.js index cb03114e5b..b326cfe41f 100644 --- a/src/app/debugger/remix-debugger/src/ui/TxBrowser.js +++ b/src/app/debugger/remix-debugger/src/ui/TxBrowser.js @@ -53,7 +53,7 @@ function TxBrowser (_parent, opts) { this.txNumber this.view this.displayConnectionSetting = opts.displayConnectionSetting - this.web3 = _parent.debugger.web3 + this.web3 = opts.web3 var self = this _parent.event.register('providerChanged', this, function (provider) { self.setDefaultValues()