#34 - Fix memo address validation

This commit is contained in:
adityapk00
2018-11-10 09:10:22 -08:00
parent 254cdba051
commit 59525e54b3
2 changed files with 2 additions and 2 deletions

View File

@@ -267,7 +267,7 @@ void MainWindow::setMemoEnabled(int number, bool enabled) {
void MainWindow::memoButtonClicked(int number) {
// Memos can only be used with zAddrs. So check that first
auto addr = ui->sendToWidgets->findChild<QLineEdit*>(QString("Address") + QString::number(number));
if (!addr->text().trimmed().startsWith("z")) {
if (!addressFromAddressField(addr->text()).startsWith("z")) {
QMessageBox msg(QMessageBox::Critical, "Memos can only be used with z-addresses",
"The memo field can only be used with a z-address.\n" + addr->text() + "\ndoesn't look like a z-address",
QMessageBox::Ok, this);