diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-21 19:37:46 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-21 19:37:46 +0800 |
commit | 68f4a12a8b6e0cde4a8ba144d2f63e911361cb58 (patch) | |
tree | 70f2688a21936adb958d5e16a0aa66bd5acab905 /ethereal | |
parent | 16bd88c10ab3553984d180e3048839982c864f69 (diff) | |
download | go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar.gz go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar.bz2 go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar.lz go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar.xz go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.tar.zst go-tangerine-68f4a12a8b6e0cde4a8ba144d2f63e911361cb58.zip |
Fixed unconfirmed balance string
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/ui/gui.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 440e94e22..3e2fc0dbd 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -164,7 +164,7 @@ func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) { var str string if unconfirmedFunds != nil { pos := "+" - if unconfirmedFunds.Cmp(big.NewInt(0)) >= 0 { + if unconfirmedFunds.Cmp(big.NewInt(0)) < 0 { pos = "-" } val := ethutil.CurrencyToString(new(big.Int).Abs(ethutil.BigCopy(unconfirmedFunds))) @@ -206,15 +206,10 @@ func (gui *Gui) update() { if txMsg.Event == "newTx:pre" { object := state.GetAccount(gui.addr) - if bytes.Compare(tx.Sender(), gui.addr) == 0 && object.Nonce <= tx.Nonce { + if bytes.Compare(tx.Sender(), gui.addr) == 0 { gui.win.Root().Call("addTx", ethpub.NewPTx(tx)) gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - /* - object.Nonce += 1 - state.SetStateObject(object) - */ - unconfirmedFunds.Sub(unconfirmedFunds, tx.Value) } else if bytes.Compare(tx.Recipient, gui.addr) == 0 { gui.win.Root().Call("addTx", ethpub.NewPTx(tx)) |