Send: clear donate description if address was changed

This commit is contained in:
tobtoht 2023-10-16 22:13:59 +02:00
parent 8c88f69f25
commit a5135ecf8e
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
3 changed files with 7 additions and 1 deletions

View file

@ -1067,7 +1067,7 @@ void MainWindow::changeEvent(QEvent* event)
}
void MainWindow::donateButtonClicked() {
m_sendWidget->fill(constants::donationAddress, "Donation to the Feather development team");
m_sendWidget->fill(constants::donationAddress, constants::donationDescription);
ui->tabWidget->setCurrentIndex(Tabs::SEND);
}

View file

@ -90,6 +90,11 @@ void SendWidget::addressEdited() {
}
ui->btn_openAlias->setVisible(ui->lineAddress->isOpenAlias());
// Clear donation description if address no longer matches
if (ui->lineDescription->text() == constants::donationDescription && ui->lineAddress->text() != constants::donationAddress) {
ui->lineDescription->clear();
}
}
void SendWidget::amountEdited(const QString &text) {

View file

@ -23,6 +23,7 @@ namespace constants
// donation constants
const QString donationAddress = "47ntfT2Z5384zku39pTM6hGcnLnvpRYW2Azm87GiAAH2bcTidtq278TL6HmwyL8yjMeERqGEBs3cqC8vvHPJd1cWQrGC65f";
const QString donationDescription = "Donation to the Feather development team";
const int donationBoundary = 25;
}