aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-15 20:51:11 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-15 20:51:11 +0200
commitb6fc7f283f832cfbc8b580bc9094ed20c0b93741 (patch)
treedc15d56d6717e958d09941d03f0f77ff7390bae9 /src/wallet
parentMerge pull request #2266 (diff)
parentWalletAPI: add getDefaultDataDir() (diff)
downloadmonero-b6fc7f283f832cfbc8b580bc9094ed20c0b93741.tar.xz
Merge pull request #2270
1307e3cc WalletAPI: add getDefaultDataDir() (Jaquee)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/api/wallet.cpp6
-rw-r--r--src/wallet/api/wallet.h1
-rw-r--r--src/wallet/wallet2_api.h3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index a2bb44cfe..c0974f880 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
#include "transaction_history.h"
#include "address_book.h"
#include "common_defines.h"
+#include "common/util.h"
#include "mnemonics/electrum-words.h"
#include <boost/format.hpp>
@@ -1411,6 +1412,11 @@ bool WalletImpl::parse_uri(const std::string &uri, std::string &address, std::st
return m_wallet->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error);
}
+std::string WalletImpl::getDefaultDataDir() const
+{
+ return tools::get_default_data_dir();
+}
+
bool WalletImpl::rescanSpent()
{
clearStatus();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index 07b0f063b..8190c7873 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -129,6 +129,7 @@ public:
virtual void startRefresh();
virtual void pauseRefresh();
virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error);
+ virtual std::string getDefaultDataDir() const;
private:
void clearStatus() const;
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index b7483ef8c..8da8c62eb 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -596,6 +596,9 @@ struct Wallet
virtual bool verifySignedMessage(const std::string &message, const std::string &addres, const std::string &signature) const = 0;
virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error) = 0;
+
+ virtual std::string getDefaultDataDir() const = 0;
+
/*
* \brief rescanSpent - Rescan spent outputs - Can only be used with trusted daemon
* \return true on success