Skip to content

Commit 12660e3

Browse files
committed
Prevent pasting (no label) as label in consolidation transaction
1 parent 7c2f109 commit 12660e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,6 @@ void SendCoinsDialog::coinControlConsolidateWizardButtonClicked()
490490

491491
void SendCoinsDialog::selectedConsolidationRecipient(SendCoinsRecipient consolidationRecipient)
492492
{
493-
LogPrintf("INFO: %s: SLOT called.", __func__);
494-
495493
ui->coinControlChangeCheckBox->setChecked(true);
496494
ui->coinControlChangeEdit->setText(consolidationRecipient.address);
497495

@@ -505,6 +503,12 @@ void SendCoinsDialog::selectedConsolidationRecipient(SendCoinsRecipient consolid
505503
}
506504
}
507505

506+
// The AddressTableModel substitutes the translated "(no label)" when the label is empty. If we use
507+
// that here, we will end up pasting a literal lable of "(no label)". Because the translation (tr) should
508+
// be consistent between here and the AddressTableModel::data, it should match the conditional and be put
509+
// back to the desired empty QString.
510+
if (consolidationRecipient.label == tr("(no label)")) consolidationRecipient.label = QString();
511+
508512
pasteEntry(consolidationRecipient);
509513
}
510514

0 commit comments

Comments
 (0)