From 0a1eeca41e6ba5920ba65d9b41654768299bc7e3 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 18 Mar 2015 13:00:01 +0100 Subject: conversions. -compilable- --- xeth/types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xeth/types.go') diff --git a/xeth/types.go b/xeth/types.go index d6d2a11f7..d8d6ff19f 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -142,9 +142,9 @@ func NewTx(tx *types.Transaction) *Transaction { hash := tx.Hash().Hex() receiver := tx.To().Hex() if len(receiver) == 0 { - receiver = toHex(core.AddressFromMessage(tx)) + receiver = core.AddressFromMessage(tx).Hex() } - sender := toHex(tx.From()) + sender, _ := tx.From() createsContract := core.MessageCreatesContract(tx) var data string @@ -154,7 +154,7 @@ func NewTx(tx *types.Transaction) *Transaction { data = toHex(tx.Data()) } - return &Transaction{ref: tx, Hash: hash, Value: common.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: toHex(tx.Data())} + return &Transaction{ref: tx, Hash: hash, Value: common.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender.Hex(), CreatesContract: createsContract, RawData: toHex(tx.Data())} } func (self *Transaction) ToString() string { -- cgit