Skip to content

Commit 54f8026

Browse files
committed
[CoinControl] Allow non-wallet owned change addresses
1 parent 041331e commit 54f8026

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,19 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
772772
if (!model->havePrivKey(keyid)) // Unknown change address
773773
{
774774
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
775+
776+
// confirmation dialog
777+
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?"),
778+
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
779+
780+
if(btnRetVal == QMessageBox::Yes)
781+
CoinControlDialog::coinControl->destChange = addr.Get();
782+
else
783+
{
784+
ui->lineEditCoinControlChange->setText("");
785+
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
786+
ui->labelCoinControlChangeLabel->setText("");
787+
}
775788
}
776789
else // Known change address
777790
{

0 commit comments

Comments
 (0)