@ -189,14 +188,16 @@ export class ExecutionContext {
constoldProvider=web3.currentProvider
web3.setProvider(endpoint)
web3.eth.net.isListening((err,isConnected)=>{
if(!err&&isConnected){
if(!err&&isConnected===true){
this.executionContext=context
this._updateBlockGasLimit()
this.event.trigger('contextChanged',[context])
this.event.trigger('web3EndpointChanged')
cb()
}elseif(isConnected==='canceled'){
web3.setProvider(oldProvider)
cb()
}else{
web3.setProvider(oldProvider)
cb('Not possible to connect to the Web3 provider. Make sure the provider is running, a connection is open (via IPC or RPC) or that the provider plugin is properly configured.')