diff --git a/lib/Cargo.lock b/lib/Cargo.lock index 1ee06e871..888c56129 100644 --- a/lib/Cargo.lock +++ b/lib/Cargo.lock @@ -802,7 +802,7 @@ dependencies = [ [[package]] name = "boltz-client" version = "0.2.0" -source = "git+https://github.com/SatoshiPortal/boltz-rust?branch=trunk#540b5cb6505a97f1d02d846bf544bd5c1f800b25" +source = "git+https://github.com/SatoshiPortal/boltz-rust?branch=trunk#aefa653e943b515a608497da0db485c20c643302" dependencies = [ "bip39", "bitcoin 0.32.4", @@ -5693,7 +5693,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/lib/core/src/swapper/boltz/bitcoin.rs b/lib/core/src/swapper/boltz/bitcoin.rs index 0c7769cd1..782f018c0 100644 --- a/lib/core/src/swapper/boltz/bitcoin.rs +++ b/lib/core/src/swapper/boltz/bitcoin.rs @@ -3,6 +3,7 @@ use std::str::FromStr; use boltz_client::{ bitcoin::{address::Address, Transaction}, boltz::SwapTxKind, + fees::Fee, util::secrets::Preimage, BtcSwapTx, }; @@ -94,7 +95,11 @@ impl BoltzSwapper { false => None, }; - let signed_tx = refund_tx.sign_refund(&refund_keypair, broadcast_fees_sat, cooperative)?; + let signed_tx = refund_tx.sign_refund( + &refund_keypair, + Fee::Absolute(broadcast_fees_sat), + cooperative, + )?; Ok(signed_tx) } @@ -118,7 +123,7 @@ impl BoltzSwapper { let signed_tx = claim_tx_wrapper.sign_claim( &claim_keypair, &Preimage::from_str(&swap.preimage)?, - swap.claim_fees_sat, + Fee::Absolute(swap.claim_fees_sat), self.get_cooperative_details(swap.id.clone(), Some(pub_nonce), Some(partial_sig)), )?; diff --git a/lib/core/src/swapper/boltz/liquid.rs b/lib/core/src/swapper/boltz/liquid.rs index 49867e1f7..ed816ed7f 100644 --- a/lib/core/src/swapper/boltz/liquid.rs +++ b/lib/core/src/swapper/boltz/liquid.rs @@ -3,8 +3,9 @@ use std::str::FromStr; use boltz_client::{ boltz::SwapTxKind, elements::Transaction, + fees::Fee, util::{liquid_genesis_hash, secrets::Preimage}, - Amount, ElementsAddress as Address, LBtcSwapTx, + ElementsAddress as Address, LBtcSwapTx, }; use log::info; @@ -47,8 +48,9 @@ impl BoltzSwapper { let signed_tx = claim_tx_wrapper.sign_claim( &swap.get_claim_keypair()?, &Preimage::from_str(&swap.preimage)?, - Amount::from_sat(swap.claim_fees_sat), + Fee::Absolute(swap.claim_fees_sat), self.get_cooperative_details(swap.id.clone(), None, None), + true, )?; Ok(signed_tx) @@ -74,8 +76,9 @@ impl BoltzSwapper { let signed_tx = claim_tx_wrapper.sign_claim( &claim_keypair, &Preimage::from_str(&swap.preimage)?, - Amount::from_sat(swap.claim_fees_sat), + Fee::Absolute(swap.claim_fees_sat), self.get_cooperative_details(swap.id.clone(), Some(pub_nonce), Some(partial_sig)), + true, )?; Ok(signed_tx) @@ -192,8 +195,9 @@ impl BoltzSwapper { let signed_tx = refund_tx.sign_refund( &refund_keypair, - Amount::from_sat(broadcast_fees_sat), + Fee::Absolute(broadcast_fees_sat), cooperative, + true, )?; Ok(signed_tx) }