Skip to content

Commit

Permalink
fix: reflect changes from SatoshiPortal/boltz-rust@db045fb
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra-yse committed Jan 21, 2025
1 parent 9599801 commit af7f5d0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions lib/core/src/swapper/boltz/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::str::FromStr;
use boltz_client::{
bitcoin::{address::Address, Transaction},
boltz::SwapTxKind,
fees::Fee,
util::secrets::Preimage,
BtcSwapTx,
};
Expand Down Expand Up @@ -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)
}

Expand All @@ -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)),
)?;

Expand Down
12 changes: 8 additions & 4 deletions lib/core/src/swapper/boltz/liquid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit af7f5d0

Please sign in to comment.