network connection with updated web3

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent 1926889daf
commit 5c66d253c1
  1. 5
      remix-lib/src/execution/execution-context.js

@ -279,8 +279,8 @@ function ExecutionContext () {
} else { } else {
web3.setProvider(new web3.providers.HttpProvider(endpoint)) web3.setProvider(new web3.providers.HttpProvider(endpoint))
} }
// fixed web3.eth.net.isListening((err, isConnected) => {
if (web3.isConnected()) { if (!err && isConnected) {
executionContext = context executionContext = context
self._updateBlockGasLimit() self._updateBlockGasLimit()
self.event.trigger('contextChanged', ['web3']) self.event.trigger('contextChanged', ['web3'])
@ -292,6 +292,7 @@ function ExecutionContext () {
alertMsg += 'Make sure the provider is running and a connection is open (via IPC or RPC).' alertMsg += 'Make sure the provider is running and a connection is open (via IPC or RPC).'
cb(alertMsg) cb(alertMsg)
} }
})
} }
this.setProviderFromEndpoint = setProviderFromEndpoint this.setProviderFromEndpoint = setProviderFromEndpoint

Loading…
Cancel
Save