Skip to content

Commit

Permalink
Log exact error root cause when failing to lookup script address (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 authored Oct 16, 2024
1 parent 5f638ae commit b5a1d95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/core/src/chain_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ impl ChainSwapHandler {
let liquid_chain_service = self.liquid_chain_service.lock().await;
let script_pk = swap_script
.to_address(self.config.network.into())
.map_err(|_| anyhow!("Could not retrieve address from swap script"))?
.map_err(|e| anyhow!("Could not retrieve address from swap script: {e:?}"))?
.to_unconfidential()
.script_pubkey();
let utxos = liquid_chain_service.get_script_utxos(&script_pk).await?;
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/send_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl SendSwapHandler {
let liquid_chain_service = self.chain_service.lock().await;
let script_pk = swap_script
.to_address(self.config.network.into())
.map_err(|_| anyhow!("Could not retrieve address from swap script"))?
.map_err(|e| anyhow!("Could not retrieve address from swap script: {e:?}"))?
.to_unconfidential()
.script_pubkey();
let utxos = liquid_chain_service.get_script_utxos(&script_pk).await?;
Expand Down

0 comments on commit b5a1d95

Please sign in to comment.