mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
qt: drop unused watch-only functionality
The watch-only functionality in the GUI was only used for legacy wallets. Watch-only descriptor wallets do not use this. The only visible changes of this commit are: - dropped "Spendable:" label from the overview tab - column width cache is reset
This commit is contained in:
@@ -601,13 +601,7 @@ CAmount WalletModel::getAvailableBalance(const CCoinControl* control)
|
||||
// No selected coins, return the cached balance
|
||||
if (!control || !control->HasSelected()) {
|
||||
const interfaces::WalletBalances& balances = getCachedBalance();
|
||||
CAmount available_balance = balances.balance;
|
||||
// if wallet private keys are disabled, this is a watch-only wallet
|
||||
// so, let's include the watch-only balance.
|
||||
if (balances.have_watch_only && m_wallet->privateKeysDisabled()) {
|
||||
available_balance += balances.watch_only_balance;
|
||||
}
|
||||
return available_balance;
|
||||
return balances.balance;
|
||||
}
|
||||
// Fetch balance from the wallet, taking into account the selected coins
|
||||
return wallet().getAvailableBalance(*control);
|
||||
|
||||
Reference in New Issue
Block a user