diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-18 20:00:01 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-18 20:00:01 +0800 |
commit | 0a1eeca41e6ba5920ba65d9b41654768299bc7e3 (patch) | |
tree | 0c286872355608c317f9e0ec1897bb79386ae94f /xeth/types.go | |
parent | 942980609fb8a36873689bd3bd0a15488f327d56 (diff) | |
download | go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.gz go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.bz2 go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.lz go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.xz go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.zst go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.zip |
conversions. -compilable-
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 { |