Skip to content

Commit

Permalink
Fix_ErrorWhileCallingUnknownContract
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Aug 14, 2018
1 parent 62749fb commit 5d3aaaa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/execution/txLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class TxLogger {
}, { activate: true, filterFn: filterTx })

this.logUnknownTX = this._deps.editorPanel.registerCommand('unknownTransaction', (args, cmds, append) => {
// triggered for transaction AND call
var data = args[0]
var el = renderUnknownTransaction(this, data)
append(el)
Expand Down Expand Up @@ -277,11 +278,11 @@ function renderUnknownTransaction (self, data) {
var from = data.tx.from
var to = data.tx.to
var obj = {from, to}
var txType = 'unknownTx'
var txType = 'unknown' + (data.tx.isCall ? 'Call' : 'Tx')
var tx = yo`
<span id="tx${data.tx.hash}">
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}>
${checkTxStatus(data.receipt, txType)}
${checkTxStatus(data.tx, txType)}
${context(self, {from, to, data})}
<div class=${css.buttons}>
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div>
Expand All @@ -304,7 +305,7 @@ function checkTxStatus (tx, type) {
if (tx.status === '0x1') {
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>`
} else {
return yo`<i class="${css.txStatus} ${css.failed} fa fa-times-circle"></i>`
Expand Down

0 comments on commit 5d3aaaa

Please sign in to comment.