mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-11 23:05:38 -05:00
fix(gui): Only refund swaps in the background that haven't been refunded yet (#212)
This commit is contained in:
parent
82631a39d7
commit
72d324780e
1 changed files with 5 additions and 0 deletions
|
|
@ -107,6 +107,11 @@ impl Watcher {
|
||||||
|
|
||||||
// If the swap has to be refunded, do it in the background
|
// If the swap has to be refunded, do it in the background
|
||||||
if let Some(ExpiredTimelocks::Cancel { .. }) = new_timelock_status {
|
if let Some(ExpiredTimelocks::Cancel { .. }) = new_timelock_status {
|
||||||
|
// If the swap is already refunded, we can skip the refund
|
||||||
|
if matches!(state, BobState::BtcRefunded(_)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// If the swap is already running, we can skip the refund
|
// If the swap is already running, we can skip the refund
|
||||||
// The refund will be handled by the state machine
|
// The refund will be handled by the state machine
|
||||||
if let Some(current_swap_id) = self.swap_lock.get_current_swap_id().await {
|
if let Some(current_swap_id) = self.swap_lock.get_current_swap_id().await {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue