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 c900da2 commit 11c0adb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/core/src/chain_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ impl ChainSwapHandler {
BoltzApiClientV2::new(self.boltz_url())
}

pub async fn prepare_refund(
pub(crate) async fn prepare_refund(
&self,
lockup_address: &str,
output_address: &str,
Expand All @@ -765,6 +765,7 @@ impl ChainSwapHandler {

let refund_tx_vsize = match swap_script {
SwapScriptV2::Bitcoin(swap_script) => {
// TODO Update boltz-client to build refund tx with all utxos
let refund_tx = BtcSwapTx::new_refund(
swap_script,
&output_address.into(),
Expand Down Expand Up @@ -801,7 +802,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 Expand Up @@ -834,6 +835,7 @@ impl ChainSwapHandler {
false => None,
};

// 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

0 comments on commit 11c0adb

Please sign in to comment.