Skip to content

Commit

Permalink
Add TODOs for supporting more utxos in BtcSwapTx::new_refund
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 committed Sep 13, 2024
1 parent ecca6a1 commit c25de91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/src/chain_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ impl ChainSwapHandler {
Ok(())
}

pub async fn prepare_refund(
pub(crate) async fn prepare_refund(
&self,
lockup_address: &str,
refund_address: &str,
Expand Down Expand Up @@ -747,7 +747,7 @@ impl ChainSwapHandler {
.persister
.fetch_chain_swap_by_lockup_address(lockup_address)?
.ok_or(PaymentError::Generic {
err: format!("Swap {} not found", lockup_address),
err: format!("Swap for lockup address {} not found", lockup_address),
})?;

if let Some(refund_tx_id) = swap.refund_tx_id.clone() {
Expand Down
2 changes: 2 additions & 0 deletions lib/core/src/refund/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ impl ChainRefundHandler<BoltzSwapper> {

let bitcoin_electrum_config = self.bitcoin_electrum_config();

// TODO Update boltz-client to build refund tx with all utxos
let refund_tx = BtcSwapTx::new_refund(
swap_script.clone(),
&refund_address.into(),
Expand Down Expand Up @@ -241,6 +242,7 @@ impl RefundHandler<ChainSwap> for ChainRefundHandler<BoltzSwapper> {
SwapScriptV2::Bitcoin(swap_script) => {
let bitcoin_electrum_config = self.bitcoin_electrum_config();

// TODO Update boltz-client to build refund tx with all utxos
let refund_tx = BtcSwapTx::new_refund(
swap_script,
&refund_address.into(),
Expand Down

0 comments on commit c25de91

Please sign in to comment.