diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2019-09-23 19:20:22 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2019-11-13 18:54:40 +0100 |
commit | 848f88920853724511387ca0b7ef652fa14ced71 (patch) | |
tree | 32575f225ef34e3808a20d7dd1ec5fc8aef4fa66 | |
parent | 40537f090907f81ba885edb7dff1558382976912 (diff) |
[gui] send: include watch-only
For wallets with WALLET_FLAG_DISABLE_PRIVATE_KEYS.
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 8edcca684d..b1631b57c9 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -611,6 +611,9 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry) coin_control = *CoinControlDialog::coinControl(); } + // Include watch-only for wallets without private key + coin_control.fAllowWatchOnly = model->privateKeysDisabled(); + // Calculate available amount to send. CAmount amount = model->wallet().getAvailableBalance(coin_control); for (int i = 0; i < ui->entries->count(); ++i) { @@ -663,6 +666,8 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl) // Either custom fee will be used or if not selected, the confirmation target from dropdown box ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex()); ctrl.m_signal_bip125_rbf = ui->optInRBF->isChecked(); + // Include watch-only for wallets without private key + ctrl.fAllowWatchOnly = model->privateKeysDisabled(); } void SendCoinsDialog::updateSmartFeeLabel() |