mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-10 14:25:40 -05:00
Handle errors when waiting for subscriptions
We were not thorough enough in PR #705 and there were some remaining unhandled errors. Co-authored-by: Daniel Karzel <daniel@comit.network>
This commit is contained in:
parent
699b16bc43
commit
ce58b8b333
3 changed files with 14 additions and 3 deletions
|
|
@ -176,7 +176,8 @@ where
|
|||
state3,
|
||||
}
|
||||
},
|
||||
_ = tx_lock_status.wait_until_confirmed_with(state3.cancel_timelock) => {
|
||||
result = tx_lock_status.wait_until_confirmed_with(state3.cancel_timelock) => {
|
||||
let _ = result?;
|
||||
AliceState::CancelTimelockExpired {
|
||||
monero_wallet_restore_blockheight,
|
||||
transfer_proof,
|
||||
|
|
@ -325,7 +326,9 @@ where
|
|||
state3,
|
||||
}
|
||||
}
|
||||
_ = tx_cancel_status.wait_until_confirmed_with(state3.punish_timelock) => {
|
||||
result = tx_cancel_status.wait_until_confirmed_with(state3.punish_timelock) => {
|
||||
let _ = result?;
|
||||
|
||||
AliceState::BtcPunishable {
|
||||
monero_wallet_restore_blockheight,
|
||||
transfer_proof,
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ async fn next_state(
|
|||
monero_wallet_restore_blockheight
|
||||
}
|
||||
},
|
||||
_ = cancel_timelock_expires => {
|
||||
result = cancel_timelock_expires => {
|
||||
let _ = result?;
|
||||
tracing::info!("Alice took too long to lock Monero, cancelling the swap");
|
||||
|
||||
let state4 = state3.cancel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue