aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-06-17 17:40:23 +0800
committerMaran <maran.hidskes@gmail.com>2014-06-17 17:40:23 +0800
commit01e6f63e98636e7200b626185b85dfa254ce2834 (patch)
treed8995914acc624262d9858787957b97a91df6e78
parent6656f99c54aef4aaf03ba76dcab3df1cc363ab9a (diff)
downloadgo-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar.gz
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar.bz2
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar.lz
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar.xz
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.tar.zst
go-tangerine-01e6f63e98636e7200b626185b85dfa254ce2834.zip
A handful of GUI fixes
-rw-r--r--ethpub/types.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/ethpub/types.go b/ethpub/types.go
index a76421007..31b92f6ed 100644
--- a/ethpub/types.go
+++ b/ethpub/types.go
@@ -104,16 +104,17 @@ type PTx struct {
func NewPTx(tx *ethchain.Transaction) *PTx {
hash := hex.EncodeToString(tx.Hash())
receiver := hex.EncodeToString(tx.Recipient)
-
- if receiver == "" {
+ if receiver == "0000000000000000000000000000000000000000" {
receiver = hex.EncodeToString(tx.CreationAddress())
}
sender := hex.EncodeToString(tx.Sender())
createsContract := tx.CreatesContract()
- data := string(tx.Data)
+ var data string
if tx.CreatesContract() {
data = strings.Join(ethchain.Disassemble(tx.Data), "\n")
+ } else {
+ data = hex.EncodeToString(tx.Data)
}
return &PTx{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value), Address: receiver, Contract: tx.CreatesContract(), Gas: tx.Gas.String(), GasPrice: tx.GasPrice.String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: hex.EncodeToString(tx.Data)}