aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui/gui.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-12 12:13:11 +0800
committerobscuren <geffobscura@gmail.com>2014-04-12 12:13:11 +0800
commitd092d05a31554c37f4d7594d96ce9409082b5b20 (patch)
tree15f1c9384fd5577f74fc73f633951e28c3220d91 /ethereal/ui/gui.go
parentce43a9500f38bae426eef6c3c9d33e006c32c26d (diff)
parentab8d96258ea11c828a149dde176fe8e2efce0294 (diff)
downloadgo-tangerine-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.gz
go-tangerine-d092d05a31554c37f4d7594d96ce9409082b5b20.tar.zst
go-tangerine-d092d05a31554c37f4d7594d96ce9409082b5b20.zip
Merge
Diffstat (limited to 'ethereal/ui/gui.go')
-rw-r--r--ethereal/ui/gui.go4
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