fix(gui): Do not fail get_swap_infos_call if >1 retrieval fails

This commit is contained in:
Binarybaron 2024-11-29 22:29:55 +01:00
parent 13b3ecc638
commit 22878c8270

View File

@ -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)