Skip to content

Commit 72d3247

Browse files
authored
fix(gui): Only refund swaps in the background that haven't been refunded yet (#212)
1 parent 82631a3 commit 72d3247

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

swap/src/cli/watcher.rs

+5
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ impl Watcher {
107107

108108
// If the swap has to be refunded, do it in the background
109109
if let Some(ExpiredTimelocks::Cancel { .. }) = new_timelock_status {
110+
// If the swap is already refunded, we can skip the refund
111+
if matches!(state, BobState::BtcRefunded(_)) {
112+
continue;
113+
}
114+
110115
// If the swap is already running, we can skip the refund
111116
// The refund will be handled by the state machine
112117
if let Some(current_swap_id) = self.swap_lock.get_current_swap_id().await {

0 commit comments

Comments
 (0)