From 06d628b6961cea576f4ce26931b546c557707720 Mon Sep 17 00:00:00 2001 From: Jacob Brydolf Date: Mon, 10 Oct 2016 21:36:57 +0200 Subject: libwalletqt: added isRecovering state --- src/libwalletqt/Wallet.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libwalletqt/Wallet.cpp') diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index b52963bc..3c8858b5 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -115,13 +115,18 @@ bool Wallet::store(const QString &path) return m_walletImpl->store(path.toStdString()); } -bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit) +bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering, quint64 restoreHeight) { return m_walletImpl->init(daemonAddress.toStdString(), upperTransactionLimit); } -void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit) +void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering, quint64 restoreHeight) { + if (isRecovering){ + qDebug() << "RESTORING"; + m_walletImpl->setRecoveringFromSeed(true); + m_walletImpl->setRefreshFromBlockHeight(restoreHeight); + } m_walletImpl->initAsync(daemonAddress.toStdString(), upperTransactionLimit); } @@ -263,6 +268,5 @@ Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent) Wallet::~Wallet() { - Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); } -- cgit v1.2.3