interfaces, wallet: Expose migrate wallet

This commit is contained in:
Andrew Chow
2023-06-13 15:04:22 -04:00
parent da494186f2
commit 5b3a85b4c6
4 changed files with 28 additions and 1 deletions

View File

@@ -4253,7 +4253,7 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
// Migration successful, unload the wallet locally, then reload it.
assert(local_wallet.use_count() == 1);
local_wallet.reset();
LoadWallet(context, wallet_name, /*load_on_start=*/std::nullopt, options, status, error, warnings);
res.wallet = LoadWallet(context, wallet_name, /*load_on_start=*/std::nullopt, options, status, error, warnings);
res.wallet_name = wallet_name;
} else {
// Migration failed, cleanup