Changeset View
Changeset View
Standalone View
Standalone View
src/qt/signverifymessagedialog.cpp
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { | void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { | ||||
if (!model) return; | if (!model) return; | ||||
/* Clear old signature to ensure users don't get confused on error with an | /* Clear old signature to ensure users don't get confused on error with an | ||||
* old signature displayed */ | * old signature displayed */ | ||||
ui->signatureOut_SM->clear(); | ui->signatureOut_SM->clear(); | ||||
CTxDestination destination = | CTxDestination destination = DecodeDestination( | ||||
DecodeDestination(ui->addressIn_SM->text().toStdString()); | ui->addressIn_SM->text().toStdString(), model->getChainParams()); | ||||
if (!IsValidDestination(destination)) { | if (!IsValidDestination(destination)) { | ||||
ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); | ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); | ||||
ui->statusLabel_SM->setText( | ui->statusLabel_SM->setText( | ||||
tr("The entered address is invalid.") + QString(" ") + | tr("The entered address is invalid.") + QString(" ") + | ||||
tr("Please check the address and try again.")); | tr("Please check the address and try again.")); | ||||
return; | return; | ||||
} | } | ||||
const CKeyID *keyID = boost::get<CKeyID>(&destination); | const CKeyID *keyID = boost::get<CKeyID>(&destination); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | if (model && model->getAddressTableModel()) { | ||||
dlg.setModel(model->getAddressTableModel()); | dlg.setModel(model->getAddressTableModel()); | ||||
if (dlg.exec()) { | if (dlg.exec()) { | ||||
setAddress_VM(dlg.getReturnValue()); | setAddress_VM(dlg.getReturnValue()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() { | void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() { | ||||
CTxDestination destination = | CTxDestination destination = DecodeDestination( | ||||
DecodeDestination(ui->addressIn_VM->text().toStdString()); | ui->addressIn_VM->text().toStdString(), model->getChainParams()); | ||||
if (!IsValidDestination(destination)) { | if (!IsValidDestination(destination)) { | ||||
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); | ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); | ||||
ui->statusLabel_VM->setText( | ui->statusLabel_VM->setText( | ||||
tr("The entered address is invalid.") + QString(" ") + | tr("The entered address is invalid.") + QString(" ") + | ||||
tr("Please check the address and try again.")); | tr("Please check the address and try again.")); | ||||
return; | return; | ||||
} | } | ||||
if (!boost::get<CKeyID>(&destination)) { | if (!boost::get<CKeyID>(&destination)) { | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |