diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-12-23 10:24:29 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-12-23 16:07:37 +0100 |
commit | 54f80263fc56bb5ebbcccd9d647ad4884659ea9b (patch) | |
tree | 316ae6c03192884d92c48b176aa7bd0e31d4e5d8 /src/qt/sendcoinsdialog.cpp | |
parent | 041331e1da23e4136fd046ed870cdcc177464176 (diff) |
[CoinControl] Allow non-wallet owned change addresses
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 13210a1adc..40e51c7abc 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -772,6 +772,19 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text) if (!model->havePrivKey(keyid)) // Unknown change address { ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address")); + + // confirmation dialog + QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm custom change address"), tr("The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?"), + QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); + + if(btnRetVal == QMessageBox::Yes) + CoinControlDialog::coinControl->destChange = addr.Get(); + else + { + ui->lineEditCoinControlChange->setText(""); + ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}"); + ui->labelCoinControlChangeLabel->setText(""); + } } else // Known change address { |