Commit c0081f66 authored by ninabreznik's avatar ninabreznik Committed by yann300

Fix TO field in details for constructor and call transactions

parent 68d6f236
......@@ -106,8 +106,19 @@ function log (self, tx, api) {
}
function renderKnownTransaction (self, data) {
if (data.tx.blockHash) {
var to = data.tx.to
if (to) to = helper.shortenAddress(data.tx.to)
to = helper.shortenAddress(data.tx.to)
} else if (data.tx.hash) {
var name = data.resolvedData.contractName
var fn = data.resolvedData.fn
if (fn === '(constructor)') { // create instance
to = name + '.' + fn + ',' + ' 0 logs'
} else { // function call
var toHash = helper.shortenAddress(data.resolvedData.to)
to = name + '.' + fn + toHash + ',' + ' 0 logs'
}
}
function debug () {
self.event.trigger('debugRequested', [data.tx.hash])
}
......
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