|
|
|
@ -114,16 +114,15 @@ function ExecutionContext () { |
|
|
|
|
this.executionContextChange = function (context, endPointUrl, cb) { |
|
|
|
|
if (!cb) cb = () => {} |
|
|
|
|
function runPrompt () { |
|
|
|
|
executionContext = context |
|
|
|
|
if (!endPointUrl) { |
|
|
|
|
endPointUrl = 'http://localhost:8545' |
|
|
|
|
} |
|
|
|
|
modalDialogCustom.prompt(null, 'Web3 Provider Endpoint', endPointUrl, (target) => { |
|
|
|
|
executionContext = context |
|
|
|
|
setProviderFromEndpoint(target) |
|
|
|
|
self.event.trigger('contextChanged', ['web3']) |
|
|
|
|
cb() |
|
|
|
|
}, () => { |
|
|
|
|
self.event.trigger('contextChanged', ['web3']) |
|
|
|
|
cb() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|