diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index 37a6b65a..667dae6e 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -190,6 +190,11 @@ async fn next_state( // Bob sends Alice his key select! { + state5 = state.watch_for_redeem_btc(bitcoin_wallet) => { + // there seems to be a weird edge case where you can send the encrypted signature, alice can redeem the btc, but your database doesn't update to encsigsent or btcredeemed, so here we will watch for redemption too, so we have a chance to unlock xmr. + // this seemed to have happened when a surge of blocks came in on stagenet within a short time frame + BobState::BtcRedeemed(state5?) + }, result = event_loop_handle.send_encrypted_signature(state.tx_redeem_encsig()) => { match result { Ok(_) => BobState::EncSigSent(state),