Skip to content

Conversation

@bartosz-the-coder-at-avalabs
Copy link
Contributor

Description

https://ava-labs.atlassian.net/browse/CP-12749

Changes

Testing

Screenshots:

image image image

Checklist for the author

Tick each of them when done or if not applicable.

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

Comment on lines -87 to -94
const sortedNetworks = useMemo(() => {
return [...networks].sort((a, b) => {
return (
Number(defaultNetworkSet.has(b.chainId)) -
Number(defaultNetworkSet.has(a.chainId))
);
});
}, [networks]);
Copy link
Contributor Author

@bartosz-the-coder-at-avalabs bartosz-the-coder-at-avalabs Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: the sorting is done in the NetworkContext context

}, [updateBalanceOnNetworks, fetchWalletBalancesSequentially, allAccounts]);

const enabledNetworksArray = useMemo(
() => enabledNetworks.map((network) => network.chainId) || [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array.map function always returns a new array

@bartosz-the-coder-at-avalabs bartosz-the-coder-at-avalabs merged commit df05af0 into next-gen/code-freeze-fixes Jan 9, 2026
3 checks passed
@bartosz-the-coder-at-avalabs bartosz-the-coder-at-avalabs deleted the fix/ng/CP-12749-promote-btc-eth branch January 9, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants