Skip to content

Commit

Permalink
Updated value for mined blocks. Closes #197
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Dec 2, 2014
1 parent 0a22dc2 commit edc52bd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cmd/mist/assets/qml/views/wallet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ Rectangle {
anchors.fill: parent

function onReady() {
menuItem.secondaryTitle = eth.numberToHuman(eth.balanceAt(eth.key().address))
setBalance()
}

function setBalance() {
balance.text = "<b>Balance</b>: " + eth.numberToHuman(eth.balanceAt(eth.key().address))
if(menuItem)
menuItem.secondaryTitle = eth.numberToHuman(eth.balanceAt(eth.key().address))
}

ListModel {
Expand All @@ -39,7 +45,6 @@ Rectangle {

Text {
id: balance
text: "<b>Balance</b>: " + eth.numberToHuman(eth.balanceAt(eth.key().address))
font.pixelSize: 24
anchors {
horizontalCenter: parent.horizontalCenter
Expand Down Expand Up @@ -126,7 +131,6 @@ Rectangle {
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})
console.log(res)
}
}
}
Expand Down Expand Up @@ -158,6 +162,8 @@ Rectangle {
}

function addTxs(messages) {
setBalance()

for(var i = 0; i < messages.length; i++) {
var message = messages.get(i);
var to = eth.lookupName(message.to);
Expand Down

0 comments on commit edc52bd

Please sign in to comment.