From: tobtoht Date: Fri, 4 Mar 2022 16:57:00 +0000 (+0100) Subject: WindowManager: warn on non-deterministic wallet X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=db56f99493d8716b75e54bb7e7cb8e0e806354bd;p=gamesguru%2Ffeather.git WindowManager: warn on non-deterministic wallet --- diff --git a/src/WindowManager.cpp b/src/WindowManager.cpp index 1c4a1468..47f1866c 100644 --- a/src/WindowManager.cpp +++ b/src/WindowManager.cpp @@ -195,6 +195,21 @@ void WindowManager::onWalletOpened(Wallet *wallet) { } } + if (!wallet->viewOnly() && !wallet->isHwBacked()) { + if (!wallet->isDeterministic()) { + auto result = QMessageBox::question(nullptr, "Non-deterministic wallet", + "This wallet is not deterministic. This may be caused by a corrupt keys file. " + "If you are unsure what this means, RESTORE YOUR WALLET FROM SEED.\n\n" + "USING THIS WALLET FILE MAY RESULT IN A LOSS OF FUNDS.\n\n" + "Open this wallet anyway?"); + if (result == QMessageBox::No) { + wallet->deleteLater(); + this->initWizard(); + return; + } + } + } + // Create new mainwindow with wallet m_splashDialog->hide();