Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show First 20 Lines • Show All 515 Lines • ▼ Show 20 Lines | public: | ||||
Chain &m_chain; | Chain &m_chain; | ||||
std::vector<std::string> m_wallet_filenames; | std::vector<std::string> m_wallet_filenames; | ||||
std::vector<std::unique_ptr<Handler>> m_rpc_handlers; | std::vector<std::unique_ptr<Handler>> m_rpc_handlers; | ||||
}; | }; | ||||
} // namespace | } // namespace | ||||
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet> &wallet) { | std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet> &wallet) { | ||||
return std::make_unique<WalletImpl>(wallet); | return wallet ? std::make_unique<WalletImpl>(wallet) : nullptr; | ||||
} | } | ||||
std::unique_ptr<ChainClient> | std::unique_ptr<ChainClient> | ||||
MakeWalletClient(Chain &chain, std::vector<std::string> wallet_filenames) { | MakeWalletClient(Chain &chain, std::vector<std::string> wallet_filenames) { | ||||
return std::make_unique<WalletClientImpl>(chain, | return std::make_unique<WalletClientImpl>(chain, | ||||
std::move(wallet_filenames)); | std::move(wallet_filenames)); | ||||
} | } | ||||
} // namespace interfaces | } // namespace interfaces |