WalletLoader methods
| 560 | |
| 561 | //! WalletLoader methods |
| 562 | util::Result<std::unique_ptr<Wallet>> createWallet(const std::string& name, const SecureString& passphrase, uint64_t wallet_creation_flags, std::vector<bilingual_str>& warnings) override |
| 563 | { |
| 564 | DatabaseOptions options; |
| 565 | DatabaseStatus status; |
| 566 | ReadDatabaseArgs(*m_context.args, options); |
| 567 | options.require_create = true; |
| 568 | options.create_flags = wallet_creation_flags; |
| 569 | options.create_passphrase = passphrase; |
| 570 | bilingual_str error; |
| 571 | std::unique_ptr<Wallet> wallet{MakeWallet(m_context, CreateWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))}; |
| 572 | if (wallet) { |
| 573 | return wallet; |
| 574 | } else { |
| 575 | return util::Error{error}; |
| 576 | } |
| 577 | } |
| 578 | util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) override |
| 579 | { |
| 580 | DatabaseOptions options; |
nothing calls this directly
no test coverage detected