Commit 5d3aaaa7 authored by yann300's avatar yann300

Fix_ErrorWhileCallingUnknownContract

parent 62749fb4
...@@ -157,6 +157,7 @@ class TxLogger { ...@@ -157,6 +157,7 @@ class TxLogger {
}, { activate: true, filterFn: filterTx }) }, { activate: true, filterFn: filterTx })
this.logUnknownTX = this._deps.editorPanel.registerCommand('unknownTransaction', (args, cmds, append) => { this.logUnknownTX = this._deps.editorPanel.registerCommand('unknownTransaction', (args, cmds, append) => {
// triggered for transaction AND call
var data = args[0] var data = args[0]
var el = renderUnknownTransaction(this, data) var el = renderUnknownTransaction(this, data)
append(el) append(el)
...@@ -277,11 +278,11 @@ function renderUnknownTransaction (self, data) { ...@@ -277,11 +278,11 @@ function renderUnknownTransaction (self, data) {
var from = data.tx.from var from = data.tx.from
var to = data.tx.to var to = data.tx.to
var obj = {from, to} var obj = {from, to}
var txType = 'unknownTx' var txType = 'unknown' + (data.tx.isCall ? 'Call' : 'Tx')
var tx = yo` var tx = yo`
<span id="tx${data.tx.hash}"> <span id="tx${data.tx.hash}">
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}> <div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}>
${checkTxStatus(data.receipt, txType)} ${checkTxStatus(data.tx, txType)}
${context(self, {from, to, data})} ${context(self, {from, to, data})}
<div class=${css.buttons}> <div class=${css.buttons}>
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div> <div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div>
...@@ -304,7 +305,7 @@ function checkTxStatus (tx, type) { ...@@ -304,7 +305,7 @@ function checkTxStatus (tx, type) {
if (tx.status === '0x1') { if (tx.status === '0x1') {
return yo`<i class="${css.txStatus} ${css.succeeded} fa fa-check-circle"></i>` return yo`<i class="${css.txStatus} ${css.succeeded} fa fa-check-circle"></i>`
} }
if (type === 'call') { if (type === 'call' || type === 'unknownCall') {
return yo`<i class="${css.txStatus} ${css.call}">call</i>` return yo`<i class="${css.txStatus} ${css.call}">call</i>`
} else { } else {
return yo`<i class="${css.txStatus} ${css.failed} fa fa-times-circle"></i>` return yo`<i class="${css.txStatus} ${css.failed} fa fa-times-circle"></i>`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment