forked from Public/monero-gui
Hide 'unlocked balance' when no funds are available
This commit is contained in:
committed by
moneromooo-monero
parent
2e89f86b9f
commit
dc445edaae
17
main.qml
17
main.qml
@@ -381,6 +381,23 @@ ApplicationWindow {
|
||||
function onWalletUpdate() {
|
||||
console.log(">>> wallet updated")
|
||||
updateBalance();
|
||||
var unlockedBalance = walletManager.displayAmount(currentWallet.unlockedBalance);
|
||||
var unlockedBalanceFloat = parseFloat(unlockedBalance);
|
||||
|
||||
if(unlockedBalanceFloat === 0){
|
||||
// no available funds; hide the 'unlocked balance' label
|
||||
leftPanel.unlockedBalanceVisible = false
|
||||
leftPanel.unlockedBalanceLabelVisible = false
|
||||
} else {
|
||||
leftPanel.unlockedBalanceVisible = true
|
||||
leftPanel.unlockedBalanceLabelVisible = true
|
||||
leftPanel.unlockedBalanceText.text = unlockedBalance
|
||||
}
|
||||
|
||||
// showing middlePanel unlockedBalance regardless
|
||||
middlePanel.unlockedBalanceText = leftPanel.unlockedBalanceText = unlockedBalance;
|
||||
middlePanel.balanceText = leftPanel.balanceText = walletManager.displayAmount(currentWallet.balance);
|
||||
|
||||
// Update history if new block found since last update
|
||||
if(foundNewBlock) {
|
||||
foundNewBlock = false;
|
||||
|
||||
Reference in New Issue
Block a user