diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-10 17:03:46 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-10 17:03:46 +0800 |
commit | fc1d1f9afd155fab1f614c6a0340233f90afafd6 (patch) | |
tree | 3bcccd5f4f5a3400763820e5f529b4697c57dabe /xeth | |
parent | 3755cfccb366f165951a5f3e03c58bde91ff1e4a (diff) | |
parent | 20fd60902b5c6bea7b7d9fb7b9031ce5925bffc4 (diff) | |
download | go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.gz go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.bz2 go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.lz go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.xz go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.zst go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.zip |
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/types.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xeth/types.go b/xeth/types.go index 739092474..1be5e109c 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -140,8 +140,11 @@ type Transaction struct { func NewTx(tx *types.Transaction) *Transaction { hash := tx.Hash().Hex() - receiver := tx.To().Hex() - if len(receiver) == 0 { + + var receiver string + if to := tx.To(); to != nil { + receiver = to.Hex() + } else { receiver = core.AddressFromMessage(tx).Hex() } sender, _ := tx.From() |