]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Revert "Ensure ringdb is written after wallet creation"
authortobtoht <thotbot@protonmail.com>
Sun, 26 Jun 2022 13:38:52 +0000 (15:38 +0200)
committertobtoht <thotbot@protonmail.com>
Sun, 26 Jun 2022 13:39:09 +0000 (15:39 +0200)
This reverts commit d52df3b94edf00616b66ea98e25ed01e5cccbceb.

Regression: must ensure wallet is stored before opening it again.

src/WindowManager.cpp
src/libwalletqt/Wallet.cpp

index 1ce6c3822fac58e17603d13f2973565d67325cec..64978a387dd36d2441f013e42b9a2ffbf4e9cc02 100644 (file)
@@ -279,8 +279,7 @@ void WindowManager::tryCreateWallet(Seed seed, const QString &path, const QStrin
     wallet->setCacheAttribute("feather.seed", seed.mnemonic.join(" "));
     wallet->setCacheAttribute("feather.seedoffset", seedOffset);
 
-    wallet->deleteLater();
-    this->tryOpenWallet(path, password);
+    this->onWalletOpened(wallet);
 }
 
 void WindowManager::tryCreateWalletFromDevice(const QString &path, const QString &password, const QString &deviceName, int restoreHeight)
index d97adbe3cb36cf66421d594037038830ac709321..76bc09821541388a2603d115b100338ad9f2b630 100644 (file)
@@ -1413,18 +1413,18 @@ Wallet::~Wallet()
 
     m_scheduler.shutdownWaitForFinished();
 
-    if (status() == Status_Critical || status() == Status_BadPassword)
+    //Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
+    if(status() == Status_Critical || status() == Status_BadPassword)
         qDebug("Not storing wallet cache");
-    else if (m_walletImpl->store(""))
+    else ifm_walletImpl->store(""))
         qDebug("Wallet cache stored successfully");
     else
         qDebug("Error storing wallet cache");
-
     delete m_walletImpl;
     m_walletImpl = nullptr;
     delete m_walletListener;
-    m_walletListener = nullptr;
-    qDebug("~Wallet: Closed");
+    m_walletListener = NULL;
+    qDebug("m_walletImpl deleted");
 }
 
 void Wallet::startRefreshThread()