Skip to content

Commit

Permalink
fix: convertChainInfo connection sorting
Browse files Browse the repository at this point in the history
- prevents empty entries from affecting sort order and causing unnecessary git diff churn
  • Loading branch information
0xpatrickdev committed Oct 29, 2024
1 parent d77f39f commit cf708f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/orchestration/src/utils/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export const convertChainInfo = async registry => {
const connections = Object.fromEntries(
ibcData
.map(datum => toConnectionEntry(datum, name, chainInfo))
.filter(entry => entry.length > 0)
// sort alphabetically for consistency
.sort(([a], [b]) => (a && b ? a.localeCompare(b) : 0)),
.sort(([a], [b]) => a.localeCompare(b)),
);
chainInfo[name] = { ...chainInfo[name], connections };
}
Expand Down

0 comments on commit cf708f8

Please sign in to comment.