diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-12 12:13:11 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-12 12:13:11 +0800 |
commit | d092d05a31554c37f4d7594d96ce9409082b5b20 (patch) | |
tree | 15f1c9384fd5577f74fc73f633951e28c3220d91 /ethereal/ui | |
parent | ce43a9500f38bae426eef6c3c9d33e006c32c26d (diff) | |
parent | ab8d96258ea11c828a149dde176fe8e2efce0294 (diff) | |
download | dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.gz dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.bz2 dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.lz dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.xz dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.zst dexon-d092d05a31554c37f4d7594d96ce9409082b5b20.zip |
Merge
Diffstat (limited to 'ethereal/ui')
-rw-r--r-- | ethereal/ui/gui.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index d6510bbb6..1065b716e 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -21,13 +21,15 @@ type Block struct { type Tx struct { Value, Hash, Address string + Contract bool } func NewTxFromTransaction(tx *ethchain.Transaction) *Tx { hash := hex.EncodeToString(tx.Hash()) sender := hex.EncodeToString(tx.Recipient) + isContract := len(tx.Data) > 0 - return &Tx{Hash: hash, Value: ethutil.CurrencyToString(tx.Value), Address: sender} + return &Tx{Hash: hash, Value: ethutil.CurrencyToString(tx.Value), Address: sender, Contract: isContract} } // Creates a new QML Block from a chain block |