From fce83c708c6076d8949a06cd10a88fb50c55f3dd Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 24 Oct 2023 17:25:53 +0200 Subject: [PATCH] fail_swap: do not remove swap if it has been funded --- electrum/submarine_swaps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index 7a2d573ed..fda0f3b73 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -269,7 +269,8 @@ class SwapManager(Logger): payment_key = swap.payment_hash + payment_secret self.lnworker.fail_final_onion_forwarding(payment_key) self.lnwatcher.remove_callback(swap.lockup_address) - self.swaps.pop(swap.payment_hash.hex()) + if swap.funding_txid is None: + self.swaps.pop(swap.payment_hash.hex()) @log_exceptions async def _claim_swap(self, swap: SwapData) -> None: