Log etherscan link only if link is available

pull/2125/head^2
David Disu 3 years ago committed by yann300
parent 2c5d6cb332
commit 3b9d74364d
  1. 4
      apps/remix-ide/src/blockchain/blockchain.js

@ -355,10 +355,14 @@ export class Blockchain extends Plugin {
this.executionContext.detectNetwork((error, network) => { this.executionContext.detectNetwork((error, network) => {
if (error || !network) return if (error || !network) return
if (network.name === 'VM') return if (network.name === 'VM') return
const viewEtherScanLink = etherScanLink(network.name, txhash)
if (viewEtherScanLink) {
this.call('terminal', 'logHtml', this.call('terminal', 'logHtml',
(<a href={etherScanLink(network.name, txhash)} target="_blank"> (<a href={etherScanLink(network.name, txhash)} target="_blank">
view on etherscan view on etherscan
</a>)) </a>))
}
}) })
}) })
this.txRunner = new TxRunner(web3Runner, { runAsync: true }) this.txRunner = new TxRunner(web3Runner, { runAsync: true })

Loading…
Cancel
Save