Skip to content

Commit

Permalink
return chains on abort (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo authored Nov 22, 2024
1 parent 30823b6 commit 417df15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/connect-v1/src/utils/getSortedChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const getSortedChains = async (

return [...chains].sort((a, b) => getChainScore(b) - getChainScore(a));
} catch (error) {
if ((error as Error).name !== "AbortError") return chains;
console.debug(error);
return chains;
}
};
3 changes: 2 additions & 1 deletion apps/connect/src/utils/getSortedChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const getSortedChains = async (

return [...chains].sort((a, b) => getChainScore(b) - getChainScore(a));
} catch (error) {
if ((error as Error).name !== "AbortError") return chains;
console.debug(error);
return chains;
}
};

0 comments on commit 417df15

Please sign in to comment.