diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ede66910e00..37a873f70f2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4552,7 +4552,7 @@ util::Result MigrateLegacyToDescriptor(std::shared_ptr success = reload_wallet(res.solvables_wallet); } } - if (!success) { + if (!success && !in_memory) { // Migration failed, cleanup // Copy the backup to the actual wallet dir fs::path temp_backup_location = fsbridge::AbsPathJoin(GetWalletDir(), backup_filename);