Skip to content

Commit 2ccd7be

Browse files
committed
Merge bitcoin-core/gui#653: Show watchonly balance only for Legacy wallets
fdb8dc8 gui: Show watchonly balance only for Legacy wallets (Andrew Chow) Pull request description: Descriptor wallets do not have a watchonly balance as wallets are designated watchonly or not. Thus we should not be displaying the empty watchonly balance for descriptor wallets. The result is that instead of the send page showing "Watch-only balance: 0.00000000 BTC" for watchonly descriptor wallets, we see the actual balance as "Balance: 10.00000000 BTC" ACKs for top commit: johnny9: tACK fdb8dc8 furszy: ACK fdb8dc8 hebasto: ACK fdb8dc8 Tree-SHA512: e5c0703a62d25c881c8dadfb9cffd482791f3d437a4ec5ae0088ce1a2069c2455ad6d3ec6c95a4404a3b55fbd727f92694529c35052236951553ca90c4ed31b5
2 parents daebf9e + fdb8dc8 commit 2ccd7be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/sendcoinsdialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ void SendCoinsDialog::setBalance(const interfaces::WalletBalances& balances)
699699
CAmount balance = balances.balance;
700700
if (model->wallet().hasExternalSigner()) {
701701
ui->labelBalanceName->setText(tr("External balance:"));
702-
} else if (model->wallet().privateKeysDisabled()) {
702+
} else if (model->wallet().isLegacy() && model->wallet().privateKeysDisabled()) {
703703
balance = balances.watch_only_balance;
704704
ui->labelBalanceName->setText(tr("Watch-only balance:"));
705705
}

0 commit comments

Comments
 (0)