From c25de9107bdfff918e0ba188eed25ae782e6463e Mon Sep 17 00:00:00 2001 From: ok300 <106775972+ok300@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:13:08 +0200 Subject: [PATCH] Add TODOs for supporting more utxos in BtcSwapTx::new_refund --- lib/core/src/chain_swap.rs | 4 ++-- lib/core/src/refund/chain.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/src/chain_swap.rs b/lib/core/src/chain_swap.rs index 143d06c6a..9b435080d 100644 --- a/lib/core/src/chain_swap.rs +++ b/lib/core/src/chain_swap.rs @@ -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, @@ -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() { diff --git a/lib/core/src/refund/chain.rs b/lib/core/src/refund/chain.rs index adb1e1a51..fb66dd092 100644 --- a/lib/core/src/refund/chain.rs +++ b/lib/core/src/refund/chain.rs @@ -97,6 +97,7 @@ impl ChainRefundHandler { 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(), @@ -241,6 +242,7 @@ impl RefundHandler for ChainRefundHandler { 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(),