diff --git a/src/app/execution/txLogger.js b/src/app/execution/txLogger.js index 5a2faf8611..7558c869a9 100644 --- a/src/app/execution/txLogger.js +++ b/src/app/execution/txLogger.js @@ -49,6 +49,8 @@ var css = csjs` .failed { color: ${styles.terminal.icon_Color_Log_Failed}; } + .notavailable { + } .call { font-size: 7px; background-color: ${styles.terminal.icon_BackgroundColor_Log_Call}; @@ -157,6 +159,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) @@ -277,11 +280,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`
txDetails(e, tx, data, obj)}> - ${checkTxStatus(data.receipt, txType)} + ${checkTxStatus(data.receipt || data.tx, txType)} ${context(self, {from, to, data})}
debug(e, data, self)}>Debug
@@ -304,10 +307,12 @@ function checkTxStatus (tx, type) { if (tx.status === '0x1') { return yo`` } - if (type === 'call') { + if (type === 'call' || type === 'unknownCall') { return yo`call` - } else { + } else if (tx.status === '0x0') { return yo`` + } else { + return yo`` } } @@ -406,18 +411,22 @@ function txDetails (e, tx, data, obj) { function createTable (opts) { var table = yo`
` - if (opts.status) { + if (!opts.isCall) { var msg = '' - if (opts.status === '0x0') { - msg = ' Transaction mined but execution failed' - } else if (opts.status === '0x1') { - msg = ' Transaction mined and execution succeed' + if (opts.status) { + if (opts.status === '0x0') { + msg = ' Transaction mined but execution failed' + } else if (opts.status === '0x1') { + msg = ' Transaction mined and execution succeed' + } + } else { + msg = ' Status not available at the moment' } table.appendChild(yo` - - status - ${opts.status}${msg} - `) + + status + ${opts.status}${msg} + `) } var transactionHash = yo` diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js index 45fab49aee..57ac7ad288 100644 --- a/src/app/panels/editor-panel.js +++ b/src/app/panels/editor-panel.js @@ -24,7 +24,7 @@ class EditorPanel { var self = this self._deps = { config: self._components.registry.get('config').api, - txlistener: self._components.registry.get('txlistener').api, + txListener: self._components.registry.get('txlistener').api, fileManager: self._components.registry.get('filemanager').api, udapp: self._components.registry.get('udapp').api }