diff options
Diffstat (limited to 'xeth/types.go')
-rw-r--r-- | xeth/types.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |