Merge branch 'master' of https://github.com/patrini32/xmr-btc-swap into pr/1668

This commit is contained in:
binarybaron 2024-06-28 21:02:43 +02:00
commit bb0d0a3216

View File

@ -85,8 +85,13 @@ async fn alice_manually_punishes_after_bob_dead_and_bob_cancels() {
.await;
assert!(matches!(bob_swap.state, BobState::BtcCancelled { .. }));
// Alice punished Bob, so he should be in the BtcPunished state.
let state = cli::refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db).await?;
ctx.assert_bob_punished(state).await;
let error = cli::refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db)
.await
.unwrap_err();
assert_eq!(
error.to_string(),
"Cannot refund swap because we have already been punished"
);
Ok(())
})
.await;