Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | public: | ||||
std::vector<std::string> paths; | std::vector<std::string> paths; | ||||
for (auto &path : ListWalletDir()) { | for (auto &path : ListWalletDir()) { | ||||
paths.push_back(path.string()); | paths.push_back(path.string()); | ||||
} | } | ||||
return paths; | return paths; | ||||
} | } | ||||
std::vector<std::unique_ptr<Wallet>> getWallets() override { | std::vector<std::unique_ptr<Wallet>> getWallets() override { | ||||
std::vector<std::unique_ptr<Wallet>> wallets; | std::vector<std::unique_ptr<Wallet>> wallets; | ||||
for (const std::shared_ptr<CWallet> &wallet : GetWallets()) { | for (auto &client : m_context.chain_clients) { | ||||
wallets.emplace_back(MakeWallet(wallet)); | auto client_wallets = client->getWallets(); | ||||
std::move(client_wallets.begin(), client_wallets.end(), | |||||
std::back_inserter(wallets)); | |||||
} | } | ||||
return wallets; | return wallets; | ||||
} | } | ||||
std::unique_ptr<Wallet> | std::unique_ptr<Wallet> | ||||
loadWallet(const CChainParams ¶ms, const std::string &name, | loadWallet(const CChainParams ¶ms, const std::string &name, | ||||
std::string &error, std::string &warning) const override { | std::string &error, std::string &warning) const override { | ||||
return MakeWallet( | return MakeWallet( | ||||
LoadWallet(params, *m_context.chain, name, error, warning)); | LoadWallet(params, *m_context.chain, name, error, warning)); | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |