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 20, 2024
1 parent 9b173e4 commit d2eae3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/core/src/chain_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl ChainSwapHandler {
Ok(())
}

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

let refund_tx_id = swap.refund_tx_id.clone();
Expand Down Expand Up @@ -790,7 +790,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),
})?;

ensure_sdk!(
Expand Down
1 change: 1 addition & 0 deletions lib/core/src/swapper/boltz/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ impl BoltzSwapper {
Swap::Chain(swap) => match swap.direction {
Direction::Incoming => {
let swap_script = swap.get_lockup_swap_script()?;
// TODO Update boltz-client to build refund tx with all utxos
BtcSwapTx::new_refund(
swap_script.as_bitcoin_script()?,
refund_address,
Expand Down

0 comments on commit d2eae3f

Please sign in to comment.