Skip to content

Commit

Permalink
[gui] send: include watch-only
Browse files Browse the repository at this point in the history
For wallets with WALLET_FLAG_DISABLE_PRIVATE_KEYS.
  • Loading branch information
Sjors committed Nov 13, 2019
1 parent 40537f0 commit 848f889
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 848f889

Please sign in to comment.