mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-14 20:36:32 +02:00
libwalletqt: added isRecovering state
This commit is contained in:
parent
1ca4fd24ef
commit
06d628b696
@ -115,13 +115,18 @@ bool Wallet::store(const QString &path)
|
|||||||
return m_walletImpl->store(path.toStdString());
|
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);
|
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);
|
m_walletImpl->initAsync(daemonAddress.toStdString(), upperTransactionLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,6 +268,5 @@ Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent)
|
|||||||
|
|
||||||
Wallet::~Wallet()
|
Wallet::~Wallet()
|
||||||
{
|
{
|
||||||
|
|
||||||
Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
||||||
}
|
}
|
||||||
|
@ -74,10 +74,10 @@ public:
|
|||||||
Q_INVOKABLE bool store(const QString &path);
|
Q_INVOKABLE bool store(const QString &path);
|
||||||
|
|
||||||
//! initializes wallet
|
//! initializes wallet
|
||||||
Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit);
|
Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||||
|
|
||||||
//! initializes wallet asynchronously
|
//! initializes wallet asynchronously
|
||||||
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit);
|
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||||
|
|
||||||
//! connects to daemon
|
//! connects to daemon
|
||||||
Q_INVOKABLE bool connectToDaemon();
|
Q_INVOKABLE bool connectToDaemon();
|
||||||
|
Loading…
Reference in New Issue
Block a user