Skip to content

Commit 848f889

Browse files
committed
[gui] send: include watch-only
For wallets with WALLET_FLAG_DISABLE_PRIVATE_KEYS.
1 parent 40537f0 commit 848f889

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry)
611611
coin_control = *CoinControlDialog::coinControl();
612612
}
613613

614+
// Include watch-only for wallets without private key
615+
coin_control.fAllowWatchOnly = model->privateKeysDisabled();
616+
614617
// Calculate available amount to send.
615618
CAmount amount = model->wallet().getAvailableBalance(coin_control);
616619
for (int i = 0; i < ui->entries->count(); ++i) {
@@ -663,6 +666,8 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl)
663666
// Either custom fee will be used or if not selected, the confirmation target from dropdown box
664667
ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
665668
ctrl.m_signal_bip125_rbf = ui->optInRBF->isChecked();
669+
// Include watch-only for wallets without private key
670+
ctrl.fAllowWatchOnly = model->privateKeysDisabled();
666671
}
667672

668673
void SendCoinsDialog::updateSmartFeeLabel()

0 commit comments

Comments
 (0)