From 8c9e6746ce741c5bc2d70f308acc955dace67e01 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 May 2014 11:59:03 +0200 Subject: [PATCH] Fixed wallet crash for new account. Fixes #38 --- ethereal/ui/gui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 65c87c4c2..c1fda47f4 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -207,7 +207,7 @@ func (gui *Gui) update() { state := gui.eth.StateManager().TransState() unconfirmedFunds := new(big.Int) - gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetStateObject(gui.addr).Amount))) + gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.addr).Amount))) for { select { @@ -215,7 +215,7 @@ func (gui *Gui) update() { tx := txMsg.Tx if txMsg.Type == ethchain.TxPre { - object := state.GetStateObject(gui.addr) + object := state.GetAccount(gui.addr) if bytes.Compare(tx.Sender(), gui.addr) == 0 && object.Nonce <= tx.Nonce { gui.win.Root().Call("addTx", ethpub.NewPTx(tx)) @@ -241,7 +241,7 @@ func (gui *Gui) update() { gui.win.Root().Call("setWalletValue", str) } else { - object := state.GetStateObject(gui.addr) + object := state.GetAccount(gui.addr) if bytes.Compare(tx.Sender(), gui.addr) == 0 { object.SubAmount(tx.Value) } else if bytes.Compare(tx.Recipient, gui.addr) == 0 {