diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1e7ad3fc6b8..b356d24ab55 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4018,14 +4018,16 @@ util::Result CWallet::ApplyMigrationData(WalletBatch& local_wallet_batch, // Mark as to remove from the migrated wallet only if it does not also belong to it if (!is_mine) { txids_to_delete.push_back(hash); + continue; } - continue; } } if (!is_mine) { // Both not ours and not in the watchonly wallet return util::Error{strprintf(_("Error: Transaction %s in wallet cannot be identified to belong to migrated wallets"), wtx->GetHash().GetHex())}; } + // Rewrite the transaction so that anything that may have changed about it in memory also persists to disk + local_wallet_batch.WriteTx(*wtx); } // Do the removes