create/restore at startup if needed

This commit is contained in:
DenioD
2020-08-21 20:54:12 +02:00
parent 10d12bda6b
commit 2ae92a8434
2 changed files with 30 additions and 15 deletions

View File

@@ -633,6 +633,21 @@ void MainWindow::removeWalletEncryptionStartUp() {
QDialog d(this);
Ui_startup ed;
ed.setupUi(&d);
QObject::connect(ed.new_restore, &QPushButton::clicked, [&] {
d.close();
QFile wallet(dirwallet);
QFile walletenc(dirwalletenc);
wallet.remove();
walletenc.remove();
auto cl = new ConnectionLoader(this, rpc);
cl->loadConnection();
});
if (d.exec() == QDialog::Accepted)
{
@@ -696,7 +711,7 @@ void MainWindow::removeWalletEncryptionStartUp() {
this->doClosePw();
}
}
QString MainWindow::getPassword()