Skip to content

Commit 31e86ff

Browse files
authored
fix(gui): Do not fail get_swap_infos_call if >1 retrieval fails (#217)
1 parent 13b3ecc commit 31e86ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

swap/src/cli/api/request.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,12 @@ pub async fn get_swap_infos_all(context: Arc<Context>) -> Result<Vec<GetSwapInfo
459459
let mut swap_infos = Vec::new();
460460

461461
for (swap_id, _) in swap_ids {
462-
let swap_info = get_swap_info(GetSwapInfoArgs { swap_id }, context.clone()).await?;
463-
swap_infos.push(swap_info);
462+
match get_swap_info(GetSwapInfoArgs { swap_id }, context.clone()).await {
463+
Ok(swap_info) => swap_infos.push(swap_info),
464+
Err(error) => {
465+
tracing::error!(%swap_id, %error, "Failed to get swap info");
466+
}
467+
}
464468
}
465469

466470
Ok(swap_infos)

0 commit comments

Comments
 (0)