|
|
@ -80,12 +80,15 @@ function ExecutionContext () { |
|
|
|
setExecutionContextRadio(); |
|
|
|
setExecutionContextRadio(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (context === 'web3') { |
|
|
|
if (context === 'web3') { |
|
|
|
|
|
|
|
executionContext = context; |
|
|
|
setProviderFromEndpoint(); |
|
|
|
setProviderFromEndpoint(); |
|
|
|
self.event.trigger('contextChanged', ['web3']); |
|
|
|
self.event.trigger('contextChanged', ['web3']); |
|
|
|
} else if (context === 'injected') { |
|
|
|
} else if (context === 'injected') { |
|
|
|
|
|
|
|
executionContext = context; |
|
|
|
web3.setProvider(injectedProvider); |
|
|
|
web3.setProvider(injectedProvider); |
|
|
|
self.event.trigger('contextChanged', ['injected']); |
|
|
|
self.event.trigger('contextChanged', ['injected']); |
|
|
|
} else if (context === 'vm') { |
|
|
|
} else if (context === 'vm') { |
|
|
|
|
|
|
|
executionContext = context; |
|
|
|
vm.stateManager.revert(function () { |
|
|
|
vm.stateManager.revert(function () { |
|
|
|
vm.stateManager.checkpoint(); |
|
|
|
vm.stateManager.checkpoint(); |
|
|
|
}); |
|
|
|
}); |
|
|
|