diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-26 16:53:58 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-26 16:53:58 +0800 |
commit | 5374a95c581f45f840d1e8a993fb8e403e9d4aec (patch) | |
tree | 2f4488f631e749d543e39afec35d01493feb8d9e /ethereal | |
parent | 36683f2e2957c262b17e71b15ecdb04d2feda0f5 (diff) | |
parent | 26ecf4b7809ebf79d2923f0b661818a37271be33 (diff) | |
download | dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar.gz dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar.bz2 dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar.lz dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar.xz dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.tar.zst dexon-5374a95c581f45f840d1e8a993fb8e403e9d4aec.zip |
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/assets/qml/wallet.qml | 9 | ||||
-rw-r--r-- | ethereal/ui/gui.go | 21 | ||||
-rw-r--r-- | ethereal/ui/ui_lib.go | 2 |
3 files changed, 18 insertions, 14 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index dee31a04e..7a6750f63 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -86,7 +86,6 @@ ApplicationWindow { //color: "#D9DDE7" color: "#252525" - ColumnLayout { y: 50 anchors.left: parent.left @@ -156,6 +155,7 @@ ApplicationWindow { TableView { id: txTableView anchors.fill: parent + TableViewColumn{ role: "inout" ; title: "" ; width: 40 } TableViewColumn{ role: "value" ; title: "Value" ; width: 100 } TableViewColumn{ role: "address" ; title: "Address" ; width: 430 } TableViewColumn{ role: "contract" ; title: "Contract" ; width: 100 } @@ -405,7 +405,7 @@ ApplicationWindow { anchors.left: aboutIcon.right anchors.leftMargin: 10 font.pointSize: 12 - text: "<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br><h3>Binary Distribution</h3>Jarrad Hope<br>" + text: "<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>" } } @@ -430,7 +430,6 @@ ApplicationWindow { } } SplitView { - anchors.fill: parent property var asmModel: ListModel { id: asmModel @@ -525,14 +524,14 @@ ApplicationWindow { walletValueLabel.text = value } - function addTx(tx) { + function addTx(tx, inout) { var isContract if (tx.contract == true){ isContract = "Yes" }else{ isContract = "No" } - txModel.insert(0, {hash: tx.hash, address: tx.address, value: tx.value, contract: isContract}) + txModel.insert(0, {inout: inout, hash: tx.hash, address: tx.address, value: tx.value, contract: isContract}) } function addBlock(block) { 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) } diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go index 0c43f1675..1c88b0181 100644 --- a/ethereal/ui/ui_lib.go +++ b/ethereal/ui/ui_lib.go @@ -135,7 +135,7 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string) for _, str := range dis { ui.win.Root().Call("setAsm", str) } - callerTx := ethchain.NewContractCreationTx(ethutil.Big(valueStr), ethutil.Big(gasStr), ethutil.Big(gasPriceStr), callerScript, nil) + callerTx := ethchain.NewContractCreationTx(ethutil.Big(valueStr), ethutil.Big(gasStr), ethutil.Big(gasPriceStr), nil) // Contract addr as test address keyPair := ethutil.GetKeyRing().Get(0) |