return;
}
+ if (!this->verifyPassword()) {
+ return;
+ }
+
SeedDialog dialog{m_ctx, this};
dialog.exec();
}
}
void MainWindow::showKeysDialog() {
+ if (!this->verifyPassword()) {
+ return;
+ }
+
KeysDialog dialog{m_ctx, this};
dialog.exec();
}
ui->menuRecently_open->addAction(m_clearRecentlyOpenAction);
}
+bool MainWindow::verifyPassword() {
+ bool ok;
+ while (true) {
+ QString password = QInputDialog::getText(this, "Enter password", "Please enter your password:", QLineEdit::EchoMode::Password, "", &ok);
+ if (!ok) { // Dialog cancelled
+ return false;
+ }
+ if (password != m_ctx->wallet->getPassword()) {
+ QMessageBox::warning(this, "Error", "Incorrect password");
+ continue;
+ }
+ break;
+ }
+ return true;
+}
+
void MainWindow::toggleSearchbar(bool visible) {
config()->set(Config::showSearchbar, visible);
void addToRecentlyOpened(const QString &filename);
void updateRecentlyOpenedMenu();
void updateWidgetIcons();
+ bool verifyPassword();
QIcon hardwareDevicePairedIcon();
QIcon hardwareDeviceUnpairedIcon();