aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/node.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-12 11:36:38 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 12:20:42 +0000
commitab288b4e59c52905343a1de628735b5c871d79a1 (patch)
tree602341604977e3b171477680bff7ab19ca08f47f /src/interfaces/node.cpp
parent17abc0fd52510bfeb85a7b5be04001075ec78b6b (diff)
interfaces: Add loadWallet to Node
Diffstat (limited to 'src/interfaces/node.cpp')
-rw-r--r--src/interfaces/node.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index c574f960e6..f3e990fa47 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -42,6 +42,7 @@ class CWallet;
fs::path GetWalletDir();
std::vector<fs::path> ListWalletDir();
std::vector<std::shared_ptr<CWallet>> GetWallets();
+std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning);
namespace interfaces {
@@ -252,6 +253,10 @@ public:
}
return wallets;
}
+ std::unique_ptr<Wallet> loadWallet(const std::string& name, std::string& error, std::string& warning) override
+ {
+ return MakeWallet(LoadWallet(*m_interfaces.chain, name, error, warning));
+ }
std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override
{
return MakeHandler(::uiInterface.InitMessage_connect(fn));