aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-07-14 12:58:01 -0400
committerluigi1111 <luigi1111w@gmail.com>2022-07-14 12:58:01 -0400
commit425623d6d3c9ed48153e6605eb080b4fd3e43957 (patch)
treef740d70395b6b411827d00d6470b66614cb24761 /src
parentb26f38d37ed81e84e51199425a633bc517f7bec2 (diff)
parent559106174ee2106953b5d12a65b1966e0a7776c8 (diff)
downloadmonzero-gui-425623d6d3c9ed48153e6605eb080b4fd3e43957.tar.gz
monzero-gui-425623d6d3c9ed48153e6605eb080b4fd3e43957.tar.xz
monzero-gui-425623d6d3c9ed48153e6605eb080b4fd3e43957.zip
Merge pull request #3932
5591061 SettingsWallet: add scan transaction option (selsta) 6e0b5e2 libwallet: add scanTransactions function (selsta)
Diffstat (limited to 'src')
-rw-r--r--src/libwalletqt/Wallet.cpp12
-rw-r--r--src/libwalletqt/Wallet.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index eef80b97..cec8378e 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -30,7 +30,9 @@
#include <chrono>
#include <stdexcept>
+#include <string>
#include <thread>
+#include <vector>
#include "PendingTransaction.h"
#include "UnsignedTransaction.h"
@@ -507,6 +509,16 @@ bool Wallet::importOutputs(const QString& path) {
return m_walletImpl->importOutputs(path.toStdString());
}
+bool Wallet::scanTransactions(const QVector<QString> &txids)
+{
+ std::vector<std::string> c;
+ for (const auto &v : txids)
+ {
+ c.push_back(v.toStdString());
+ }
+ return m_walletImpl->scanTransactions(c);
+}
+
bool Wallet::refresh(bool historyAndSubaddresses /* = true */)
{
refreshingSet(true);
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h
index a81b4555..039417d8 100644
--- a/src/libwalletqt/Wallet.h
+++ b/src/libwalletqt/Wallet.h
@@ -212,6 +212,9 @@ public:
Q_INVOKABLE bool exportOutputs(const QString& path, bool all = false);
Q_INVOKABLE bool importOutputs(const QString& path);
+ //! scan transactions
+ Q_INVOKABLE bool scanTransactions(const QVector<QString> &txids);
+
//! refreshes the wallet
Q_INVOKABLE bool refresh(bool historyAndSubaddresses = true);