diff options
Diffstat (limited to 'cmd/mist/assets/qml/views/wallet.qml')
-rw-r--r-- | cmd/mist/assets/qml/views/wallet.qml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml index 9727ef35c..2369390c3 100644 --- a/cmd/mist/assets/qml/views/wallet.qml +++ b/cmd/mist/assets/qml/views/wallet.qml @@ -9,20 +9,28 @@ import Ethereum 1.0 Rectangle { id: root property var title: "Wallet" - property var iconSource: "../facet.png" property var menuItem objectName: "walletView" anchors.fill: parent + Label { + objectName: "balanceLabel" + visible: false + onTextChanged: { + balance.text = text + menuItem.secondaryTitle = text + } + } + function onReady() { setBalance() } function setBalance() { - balance.text = "<b>Balance</b>: " + eth.numberToHuman(eth.balanceAt(eth.key().address)) + balance.text = "<b>Balance</b>: " + eth.numberToHuman(eth.balanceAt(eth.coinbase())) if(menuItem) - menuItem.secondaryTitle = eth.numberToHuman(eth.balanceAt(eth.key().address)) + menuItem.secondaryTitle = eth.numberToHuman(eth.balanceAt(eth.coinbase())) } ListModel { @@ -95,7 +103,7 @@ Rectangle { ComboBox { id: valueDenom - currentIndex: 6 + currentIndex: 5 model: denomModel } @@ -130,7 +138,7 @@ Rectangle { onClicked: { var value = txValue.text + denomModel.get(valueDenom.currentIndex).zeros; var gasPrice = "10000000000000" - var res = eth.transact({from: eth.key().privateKey, to: txTo.text, value: value, gas: "500", gasPrice: gasPrice}) + var res = eth.transact({from: eth.coinbase(), to: txTo.text, value: value, gas: "500", gasPrice: gasPrice}) } } } @@ -155,17 +163,10 @@ Rectangle { model: ListModel { id: txModel Component.onCompleted: { - var me = eth.key().address; - var filterTo = ethx.watch({latest: -1, to: me}); - var filterFrom = ethx.watch({latest: -1, from: me}); - filterTo.changed(addTxs) - filterFrom.changed(addTxs) - - addTxs(filterTo.messages()) - addTxs(filterFrom.messages()) } function addTxs(messages) { + /* setBalance() for(var i = 0; i < messages.length; i++) { @@ -179,6 +180,7 @@ Rectangle { } txModel.insert(0, {num: txModel.count, from: from, to: to, value: eth.numberToHuman(message.value)}) } + */ } } } |