fix listen on web3: VM is now considered as a web3 network

auto_exec_v2
yann300 3 years ago
parent f3073c7434
commit 1153444101
  1. 4
      libs/remix-lib/src/execution/txListener.ts

@ -60,7 +60,7 @@ export class TxListener {
// in VM mode // in VM mode
// in web3 mode && listen remix txs only // in web3 mode && listen remix txs only
if (!this._isListening) return // we don't listen if (!this._isListening) return // we don't listen
if (this._loopId && this.executionContext.getProvider() !== 'vm') return // we seems to already listen on a "web3" network if (this._loopId) return // we seems to already listen on a "web3" network
let returnValue let returnValue
let execResult let execResult
@ -95,7 +95,7 @@ export class TxListener {
// in VM mode // in VM mode
// in web3 mode && listen remix txs only // in web3 mode && listen remix txs only
if (!this._isListening) return // we don't listen if (!this._isListening) return // we don't listen
if (this._loopId && this.executionContext.getProvider() !== 'vm') return // we seems to already listen on a "web3" network if (this._loopId) return // we seems to already listen on a "web3" network
this.executionContext.web3().eth.getTransaction(txResult.transactionHash, async (error, tx) => { this.executionContext.web3().eth.getTransaction(txResult.transactionHash, async (error, tx) => {
if (error) return console.log(error) if (error) return console.log(error)

Loading…
Cancel
Save