From ab8d96258ea11c828a149dde176fe8e2efce0294 Mon Sep 17 00:00:00 2001 From: Maran Date: Fri, 11 Apr 2014 17:05:02 -0400 Subject: Added isContract to gui --- ethereal/ui/gui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ethereal/ui') 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 -- cgit v1.2.3