934: Don't wait for refund transaction to receive confirmations r=binarybaron a=binarybaron

Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable.

Closes https://github.com/comit-network/xmr-btc-swap/issues/903

Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
This commit is contained in:
bors[bot] 2022-04-14 08:26:03 +00:00 committed by GitHub
commit ec8500551f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -659,8 +659,7 @@ impl State6 {
pub async fn publish_refund_btc(&self, bitcoin_wallet: &bitcoin::Wallet) -> Result<()> {
let signed_tx_refund = self.signed_refund_transaction()?;
let (_, subscription) = bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?;
subscription.wait_until_final().await?;
bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?;
Ok(())
}