Bugfix: GUI: Overview: Fix hiding of immature when balances are zero

This commit is contained in:
Gregory Sanders 2019-04-09 13:30:37 -04:00
parent 8048a6d8bf
commit 6ab7bcc4eb

View file

@ -170,8 +170,8 @@ void OverviewPage::setBalance(const interfaces::WalletBalances& balances)
// only show immature (newly mined) balance if it's non-zero, so as not to complicate things
// for the non-mining users
bool showImmature = !balances.immature_balance.empty();
bool showWatchOnlyImmature = !balances.immature_watch_only_balance.empty();
bool showImmature = !!balances.immature_balance;
bool showWatchOnlyImmature = !!balances.immature_watch_only_balance;
// for symmetry reasons also show immature label when the watch-only one is shown
ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);