Commit 08fb22ee authored by holgerd77's avatar holgerd77

Don't trigger Web3 Provider change when second Provider Endpoint choice dialog was canceled

parent cdd86a79
...@@ -114,16 +114,15 @@ function ExecutionContext () { ...@@ -114,16 +114,15 @@ function ExecutionContext () {
this.executionContextChange = function (context, endPointUrl, cb) { this.executionContextChange = function (context, endPointUrl, cb) {
if (!cb) cb = () => {} if (!cb) cb = () => {}
function runPrompt () { function runPrompt () {
executionContext = context
if (!endPointUrl) { if (!endPointUrl) {
endPointUrl = 'http://localhost:8545' endPointUrl = 'http://localhost:8545'
} }
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', endPointUrl, (target) => { modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', endPointUrl, (target) => {
executionContext = context
setProviderFromEndpoint(target) setProviderFromEndpoint(target)
self.event.trigger('contextChanged', ['web3']) self.event.trigger('contextChanged', ['web3'])
cb() cb()
}, () => { }, () => {
self.event.trigger('contextChanged', ['web3'])
cb() cb()
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment