The other party's claim transaction might still be unconfirmed at that point.
@ -355,6 +355,9 @@ class SwapManager(Logger):
if remaining_time > 0:
# too early for refund
return
if swap.preimage:
# we have been paid. do not try to get refund.
else:
if swap.preimage is None:
swap.preimage = self.lnworker.get_preimage(swap.payment_hash)