Skip to content

Commit

Permalink
fix(gui): Do not fail get_swap_infos_call if >1 retrieval fails
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Nov 29, 2024
1 parent 13b3ecc commit 22878c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swap/src/cli/api/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,12 @@ pub async fn get_swap_infos_all(context: Arc<Context>) -> Result<Vec<GetSwapInfo
let mut swap_infos = Vec::new();

for (swap_id, _) in swap_ids {
let swap_info = get_swap_info(GetSwapInfoArgs { swap_id }, context.clone()).await?;
swap_infos.push(swap_info);
match get_swap_info(GetSwapInfoArgs { swap_id }, context.clone()).await {
Ok(swap_info) => swap_infos.push(swap_info),
Err(error) => {
tracing::error!(%swap_id, %error, "Failed to get swap info");
}
}
}

Ok(swap_infos)
Expand Down

0 comments on commit 22878c8

Please sign in to comment.