Merge pull request #687 from karalabe/develop

xeth: fix #640, panic converting nil recipient to hex.
pull/692/head
Jeffrey Wilcke 10 years ago
commit 20fd60902b
  1. 12
      cmd/mist/gui.go
  2. 7
      xeth/types.go

@ -238,13 +238,11 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
inout = "recv"
}
var (
ptx = xeth.NewTx(tx)
send = from.Hex()
rec = tx.To().Hex()
)
ptx.Sender = send
ptx.Address = rec
ptx := xeth.NewTx(tx)
ptx.Sender = from.Hex()
if to := tx.To(); to != nil {
ptx.Address = to.Hex()
}
if window == "post" {
//gui.getObjectByName("transactionView").Call("addTx", ptx, inout)

@ -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()

Loading…
Cancel
Save