diff options
author | Maran <maran.hidskes@gmail.com> | 2014-04-12 05:05:02 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-04-12 05:05:02 +0800 |
commit | ab8d96258ea11c828a149dde176fe8e2efce0294 (patch) | |
tree | cd810367355f4e4a9e77700ffe2b7358004788e2 /ethereal/ui | |
parent | 3f82d5172f372b5f5d8d9ede4967c5d2b9867980 (diff) | |
download | go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar.gz go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar.bz2 go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar.lz go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar.xz go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.tar.zst go-tangerine-ab8d96258ea11c828a149dde176fe8e2efce0294.zip |
Added isContract to gui
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 fa4a5c833..c09c5954f 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 |