diff --git a/xeth/types.go b/xeth/types.go index 7390924740..1be5e109ca 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()