Add more details to swap_status error (#106)

* Add more details to swap_status error

* Cargo fmt
This commit is contained in:
ok300
2024-04-25 18:52:46 +00:00
committed by GitHub
parent 6e0b59fd11
commit a1ecdfed9a

View File

@@ -122,7 +122,7 @@ impl Wallet {
} => {
let status_response = client
.swap_status(SwapStatusRequest { id: id.clone() })
.map_err(|_| anyhow!("Could not contact Boltz servers for claim status"))?;
.map_err(|e| anyhow!("Failed to fetch swap status: {e:?}"))?;
let swap_state = status_response
.status
@@ -178,7 +178,7 @@ impl Wallet {
let status_response = client
.swap_status(SwapStatusRequest { id: id.clone() })
.map_err(|_| anyhow!("Could not contact Boltz servers for claim status"))?;
.map_err(|e| anyhow!("Failed to fetch swap status: {e:?}"))?;
if [
SubSwapStates::TransactionClaimed.to_string(),