From 4f9c31474239f06bb3eb24f822fc38d586b2fa9f Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Thu, 4 Jun 2020 23:12:45 +0200 Subject: [PATCH] dont allow to remove wallet encryption if wallet is not encrypt issue #91 --- src/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 57c193d..73f2af4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -459,6 +459,14 @@ void MainWindow::removeWalletEncryption() { Ui_removeencryption ed; ed.setupUi(&d); + if (fileExists(dirwalletenc) == false) { + QMessageBox::information(this, tr("Wallet is not encrypted"), + tr("Your wallet is not encrypted with a passphrase."), + QMessageBox::Ok + ); + return; + } + auto fnPasswordEdited = [=](const QString&) { QString password = ed.txtPassword->text(); // Enable the OK button if the passwords match.