diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp index ad77ad48..95fa0b77 100644 --- a/src/libwalletqt/WalletManager.cpp +++ b/src/libwalletqt/WalletManager.cpp @@ -338,6 +338,16 @@ QString WalletManager::checkUpdates(const QString &software, const QString &subd return QString::fromStdString(std::get<1>(result) + "|" + std::get<2>(result) + "|" + std::get<3>(result) + "|" + std::get<4>(result)); } +bool WalletManager::useForkRules(quint8 required_version) const +{ + quint64 earliest_height; + quint8 version; + m_pimpl->hardForkInfo(version, earliest_height); + return version >= required_version; +} + + + WalletManager::WalletManager(QObject *parent) : QObject(parent) { m_pimpl = Monero::WalletManagerFactory::getWalletManager(); diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h index 01afc064..592c7920 100644 --- a/src/libwalletqt/WalletManager.h +++ b/src/libwalletqt/WalletManager.h @@ -136,6 +136,8 @@ public: Q_INVOKABLE bool saveQrCode(const QString &, const QString &) const; Q_INVOKABLE QString checkUpdates(const QString &software, const QString &subdir) const; + Q_INVOKABLE bool useForkRules(quint8 version) const; + signals: void walletOpened(Wallet * wallet);