Browse Source

normal swaps: do not try to get a refund if we have the preimage.

The other party's claim transaction might still be unconfirmed
at that point.
master
ThomasV 1 year ago
parent
commit
f41a8105a1
  1. 3
      electrum/submarine_swaps.py

3
electrum/submarine_swaps.py

@ -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.
return
else:
if swap.preimage is None:
swap.preimage = self.lnworker.get_preimage(swap.payment_hash)

Loading…
Cancel
Save