mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-04-20 16:06:00 -04:00
refactor and print successful refund message only if it succeeded
This commit is contained in:
parent
228a4be342
commit
ca2e00e3f0
@ -19,8 +19,9 @@ pub async fn cancel_and_refund(
|
||||
Ok(s) => s,
|
||||
Err(e) => bail!(e),
|
||||
};
|
||||
|
||||
tracing::info!("Refund transaction submitted");
|
||||
if matches!(state, BobState::BtcRefunded { .. }) {
|
||||
tracing::info!("Refund transaction submitted");
|
||||
}
|
||||
Ok(state)
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ async fn alice_manually_punishes_after_bob_dead_and_bob_cancels() {
|
||||
let (bob_swap, _) = ctx
|
||||
.stop_and_resume_bob_from_db(bob_join_handle, bob_swap_id)
|
||||
.await;
|
||||
|
||||
assert!(matches!(bob_swap.state, BobState::BtcLocked { .. }));
|
||||
let state =
|
||||
cli::cancel_and_refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db).await?;
|
||||
ctx.assert_bob_punished(state).await;
|
||||
|
Loading…
x
Reference in New Issue
Block a user