From d1b03b8e5f04a2cc9ebb985bd9a1aebd2068f757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Sat, 22 Sep 2018 00:53:25 +0100 Subject: interfaces: Add getWalletDir and listWalletDir to Node --- src/interfaces/node.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/interfaces/node.cpp') diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index d95b41657c..2b19e11f08 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -38,6 +38,8 @@ #include class CWallet; +fs::path GetWalletDir(); +std::vector ListWalletDir(); std::vector> GetWallets(); namespace interfaces { @@ -218,6 +220,18 @@ class NodeImpl : public Node LOCK(::cs_main); return ::pcoinsTip->GetCoin(output, coin); } + std::string getWalletDir() override + { + return GetWalletDir().string(); + } + std::vector listWalletDir() override + { + std::vector paths; + for (auto& path : ListWalletDir()) { + paths.push_back(path.string()); + } + return paths; + } std::vector> getWallets() override { std::vector> wallets; -- cgit v1.2.3