Update blockchain.js

yann300-patch-50
yann300 2 years ago committed by GitHub
parent 3f8024aae3
commit f790e02e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      apps/remix-ide/src/blockchain/blockchain.js

@ -13,7 +13,7 @@ import { execution, EventManager, helpers } from '@remix-project/remix-lib'
import { etherScanLink } from './helper'
import { logBuilder, cancelUpgradeMsg, cancelProxyMsg, addressToString } from "@remix-ui/helper"
const { txFormat, txExecution, typeConversion, txListener: Txlistener, TxRunner, TxRunnerWeb3, txHelper } = execution
const { txResultHelper: resultToRemixTx } = helpers
const { resultToRemixTx } = helpers
const packageJson = require('../../../../package.json')
const _paq = window._paq = window._paq || [] //eslint-disable-line
@ -575,8 +575,11 @@ export class Blockchain extends Plugin {
async (error, result) => {
if (error) return reject(error)
try {
const execResult = await this.web3().eth.getExecutionResultFromSimulator(result.transactionHash)
resolve(resultToRemixTx(result, execResult))
if (this.executionContext.isVM()) {
const execResult = await this.web3().eth.getExecutionResultFromSimulator(result.transactionHash)
resolve(resultToRemixTx(result, execResult))
} else
resolve(resultToRemixTx(result))
} catch (e) {
reject(e)
}

Loading…
Cancel
Save