diff --git a/remix-debug/src/Ethdebugger.js b/remix-debug/src/Ethdebugger.js index e6b7b87752..a9a9f4db77 100644 --- a/remix-debug/src/Ethdebugger.js +++ b/remix-debug/src/Ethdebugger.js @@ -40,10 +40,6 @@ function Ethdebugger (opts) { this.tx - // this.web3Providers = new Web3Providers() - // this.addProvider('DUMMYWEB3', new DummyProvider()) - // this.switchProvider('DUMMYWEB3') - this.traceManager = new TraceManager({web3: this.web3}) this.codeManager = new CodeManager(this.traceManager) this.solidityProxy = new SolidityProxy(this.traceManager, this.codeManager) @@ -160,45 +156,12 @@ Ethdebugger.prototype.storageViewAt = function (step, address) { address: address }, this.storageResolver, this.traceManager) } -/* set env */ -// Ethdebugger.prototype.web3 = function () { -// return this.web3 -// } Ethdebugger.prototype.updateWeb3 = function (web3) { this.web3 = web3 + this.setManagers() } -// Ethdebugger.prototype.addProvider = function (type, obj) { -// this.web3Providers.addProvider(type, obj) -// this.event.trigger('providerAdded', [type]) -// } -// -// Ethdebugger.prototype.switchProvider = function (type) { -// var self = this -// this.web3Providers.get(type, function (error, obj) { -// if (error) { -// console.log('provider ' + type + ' not defined') -// } else { -// self.web3 = obj -// self.setManagers() -// // self.traceManager.web3 = self.web3 -// self.executionContext.detectNetwork((error, network) => { -// if (error || !network) { -// self.web3Debug = obj -// self.web3 = obj -// } else { -// var webDebugNode = init.web3DebugNode(network.name) -// self.web3Debug = !webDebugNode ? obj : webDebugNode -// self.web3 = !webDebugNode ? obj : webDebugNode -// } -// self.setManagers() -// }) -// self.event.trigger('providerChanged', [type]) -// } -// }) -// } - Ethdebugger.prototype.debug = function (tx) { this.setCompilationResult(this.opts.compilationResult()) if (tx instanceof Object) { diff --git a/remix-debug/src/debugger/debugger.js b/remix-debug/src/debugger/debugger.js index a3189315d1..398e9796ea 100644 --- a/remix-debug/src/debugger/debugger.js +++ b/remix-debug/src/debugger/debugger.js @@ -79,22 +79,14 @@ Debugger.prototype.switchProvider = function (type) { if (error) { console.log('provider ' + type + ' not defined') } else { - //self.web3 = obj self.debugger.updateWeb3(obj) - self.debugger.setManagers() - // self.traceManager.web3 = self.web3 self.executionContext.detectNetwork((error, network) => { if (error || !network) { - // self.web3Debug = obj - // self.web3 = obj self.debugger.updateWeb3(obj) } else { var webDebugNode = init.web3DebugNode(network.name) - // self.web3Debug = !webDebugNode ? obj : webDebugNode - // self.web3 = !webDebugNode ? obj : webDebugNode self.debugger.updateWeb3(!webDebugNode ? obj : webDebugNode) } - self.debugger.setManagers() }) self.event.trigger('providerChanged', [type]) } @@ -103,9 +95,6 @@ Debugger.prototype.switchProvider = function (type) { - - - Debugger.prototype.registerAndHighlightCodeItem = function (index) { const self = this // register selected code item, highlight the corresponding source location