Update balance label when mining
This commit is contained in:
@ -15,6 +15,17 @@ Rectangle {
|
||||
objectName: "walletView"
|
||||
anchors.fill: parent
|
||||
|
||||
Label {
|
||||
objectName: "balanceLabel"
|
||||
visible: false
|
||||
font.pixelSize: 10
|
||||
anchors.right: lastBlockLabel.left
|
||||
anchors.rightMargin: 5
|
||||
onTextChanged: {
|
||||
menuItem.secondaryTitle = text
|
||||
}
|
||||
}
|
||||
|
||||
function onReady() {
|
||||
setBalance()
|
||||
}
|
||||
|
@ -412,7 +412,9 @@ func (gui *Gui) update() {
|
||||
switch ev := ev.(type) {
|
||||
case core.NewBlockEvent:
|
||||
gui.processBlock(ev.Block, false)
|
||||
gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
|
||||
//gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
|
||||
balance := ethutil.CurrencyToString(gui.eth.ChainManager().State().GetBalance(gui.address()))
|
||||
gui.getObjectByName("balanceLabel").Set("text", fmt.Sprintf("%v", balance))
|
||||
|
||||
case core.TxPreEvent:
|
||||
tx := ev.Tx
|
||||
|
Reference in New Issue
Block a user