From cd28a1b0d40226d0ae23808cd4e56cb2983d4cbc Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 25 Jan 2017 13:48:07 +0100 Subject: [PATCH] fix provider init --- src/app.js | 2 +- src/app/execution-context.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index dd63f92233..f2c1c78c2a 100644 --- a/src/app.js +++ b/src/app.js @@ -499,9 +499,9 @@ var run = function () { var transactionDebugger = new Debugger('#debugger', editor, compiler, executionContext.event, switchToFile, offsetToLineColumnConverter) transactionDebugger.addProvider('vm', executionContext.vm()) - transactionDebugger.switchProvider('vm') transactionDebugger.addProvider('injected', executionContext.web3()) transactionDebugger.addProvider('web3', executionContext.web3()) + transactionDebugger.switchProvider(executionContext.getProvider()) var udapp = new UniversalDApp(executionContext, { removable: false, diff --git a/src/app/execution-context.js b/src/app/execution-context.js index 171360456a..84a7e81fcf 100644 --- a/src/app/execution-context.js +++ b/src/app/execution-context.js @@ -71,6 +71,10 @@ function ExecutionContext () { this.event = new EventManager() var executionContext = injectedProvider ? 'injected' : 'vm' + this.getProvider = function () { + return executionContext + } + this.isVM = function () { return executionContext === 'vm' }