diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-21 20:07:45 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-21 20:07:45 +0800 |
commit | 93d79babc9fb1e1c66e6c108f1925212d394db06 (patch) | |
tree | 63223bfb54a4970dbdb99f078fcf3a519e76a123 /ethereal/ui/gui.go | |
parent | 34008da807cdcf2a39f9ac1525155d871869ad69 (diff) | |
parent | 941e0ba60adfb1f1f279f5c406eab5e4ab9d6e21 (diff) | |
download | dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar.gz dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar.bz2 dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar.lz dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar.xz dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.tar.zst dexon-93d79babc9fb1e1c66e6c108f1925212d394db06.zip |
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
Diffstat (limited to 'ethereal/ui/gui.go')
-rw-r--r-- | ethereal/ui/gui.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 440e94e22..7290bd6ec 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -55,7 +55,7 @@ func New(ethereum *eth.Ethereum) *Gui { } func (gui *Gui) Start(assetPath string) { - const version = "0.5.0 RC7" + const version = "0.5.0 RC8" defer gui.txDb.Close() @@ -74,6 +74,7 @@ func (gui *Gui) Start(assetPath string) { // Expose the eth library and the ui library to QML context.SetVar("eth", gui) + context.SetVar("pub", gui.pub) gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath) context.SetVar("ui", gui.uiLib) @@ -164,7 +165,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 +207,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)) |