aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui/gui.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-26 06:41:55 +0800
committerobscuren <geffobscura@gmail.com>2014-05-26 06:41:55 +0800
commit0d89c1d212e121b4904bf24b5332de9d4344334b (patch)
treeb6499be349d9950ba083e211ebb787294fbf413c /ethereal/ui/gui.go
parent7f1a4c377c18055137909521d809251248b7b5af (diff)
parent818bc84591c490b29cb28ee1e4895c8f303a0af1 (diff)
downloadgo-tangerine-poc5-rc9.tar
go-tangerine-poc5-rc9.tar.gz
go-tangerine-poc5-rc9.tar.bz2
go-tangerine-poc5-rc9.tar.lz
go-tangerine-poc5-rc9.tar.xz
go-tangerine-poc5-rc9.tar.zst
go-tangerine-poc5-rc9.zip
Merge branch 'release/poc5-rc9'poc5-rc9
Diffstat (limited to 'ethereal/ui/gui.go')
-rw-r--r--ethereal/ui/gui.go21
1 files changed, 13 insertions, 8 deletions
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index 7290bd6ec..8d6796ddb 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -9,7 +9,6 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
- "github.com/obscuren/mutan"
"math/big"
"strings"
)
@@ -55,7 +54,7 @@ func New(ethereum *eth.Ethereum) *Gui {
}
func (gui *Gui) Start(assetPath string) {
- const version = "0.5.0 RC8"
+ const version = "0.5.0 RC9"
defer gui.txDb.Close()
@@ -152,7 +151,15 @@ func (gui *Gui) readPreviousTransactions() {
for it.Next() {
tx := ethchain.NewTransactionFromBytes(it.Value())
- gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
+ var inout string
+ if bytes.Compare(tx.Sender(), gui.addr) == 0 {
+ inout = "send"
+ } else {
+ inout = "recv"
+ }
+
+ gui.win.Root().Call("addTx", ethpub.NewPTx(tx), inout)
+
}
it.Release()
}
@@ -208,12 +215,12 @@ func (gui *Gui) update() {
object := state.GetAccount(gui.addr)
if bytes.Compare(tx.Sender(), gui.addr) == 0 {
- gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
+ gui.win.Root().Call("addTx", ethpub.NewPTx(tx), "send")
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
unconfirmedFunds.Sub(unconfirmedFunds, tx.Value)
} else if bytes.Compare(tx.Recipient, gui.addr) == 0 {
- gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
+ gui.win.Root().Call("addTx", ethpub.NewPTx(tx), "recv")
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
unconfirmedFunds.Add(unconfirmedFunds, tx.Value)
@@ -262,7 +269,5 @@ func (gui *Gui) Transact(recipient, value, gas, gasPrice, data string) (*ethpub.
func (gui *Gui) Create(recipient, value, gas, gasPrice, data string) (*ethpub.PReceipt, error) {
keyPair := ethutil.GetKeyRing().Get(0)
- mainInput, initInput := mutan.PreParse(data)
-
- return gui.pub.Create(ethutil.Hex(keyPair.PrivateKey), value, gas, gasPrice, initInput, mainInput)
+ return gui.pub.Create(ethutil.Hex(keyPair.PrivateKey), value, gas, gasPrice, data)
}