From 84a30d55ab6e906db54273b8ca951ee675cafb88 Mon Sep 17 00:00:00 2001 From: ninabreznik Date: Mon, 4 Sep 2017 21:43:08 +0100 Subject: [PATCH] Add logs to known TX --- src/app/execution/txLogger.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/app/execution/txLogger.js b/src/app/execution/txLogger.js index d9a2bdead1..358b208004 100644 --- a/src/app/execution/txLogger.js +++ b/src/app/execution/txLogger.js @@ -110,7 +110,7 @@ function renderKnownTransaction (self, data) { to = data.tx.to } else if (data.tx.hash) { // call (constructor of function call) var name = data.resolvedData.contractName + '.' + data.resolvedData.fn - var logs = ',' + data.logs.length + ' logs' + var logs = ', ' + data.logs.length + ' logs' if (data.resolvedData.fn === '(constructor)') { to = name + logs } else { @@ -139,7 +139,7 @@ function renderKnownTransaction (self, data) { tx.removeChild(table) } else { table = createTable({ - from, to, val: data.tx.value, input: data.tx.input, hash: data.tx.hash, gas: data.tx.gas + from, to, val: data.tx.value, input: data.tx.input, hash: data.tx.hash, gas: data.tx.gas, logs: data.logs }) tx.appendChild(table) } @@ -226,7 +226,7 @@ function createTable (opts) { var input = opts.input var hash = opts.hash var gas = opts.gas - return yo` + var table = yo` @@ -241,8 +241,8 @@ function createTable (opts) { - - + + @@ -254,4 +254,15 @@ function createTable (opts) {
from${value(val)} wei
data:${input}input:${helper.shortenHexData(input)}
hash:
` + if (opts.logs) { + var logs = opts.logs + var logs = yo` + + logs: + ${logs} + + ` + table.appendChild(logs) + } + return table }