Don't wait for refund transaction to receive confirmations

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.
pull/934/head
binarybaron 2 years ago committed by binarybaron
parent 59a62fa256
commit 38744b8780

@ -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(())
}

Loading…
Cancel
Save