]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Ensure ringdb is written after wallet creation
authortobtoht <thotbot@protonmail.com>
Thu, 23 Jun 2022 10:33:21 +0000 (12:33 +0200)
committertobtoht <thotbot@protonmail.com>
Thu, 23 Jun 2022 10:33:21 +0000 (12:33 +0200)
src/WindowManager.cpp
src/libwalletqt/Wallet.cpp

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