Skip to content

Commit acf0829

Browse files
committed
fixup! feat(suite-native): sort networks according to networksConfig
1 parent 256279f commit acf0829

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

suite-native/config/src/supportedNetworks.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export const discoverySupportedNetworks = [
5151

5252
export const orderedNetworksSymbols = Object.keys(networks) as NetworkSymbol[];
5353

54-
export const sortNetworks = (networks: Network[]) =>
55-
A.sort(networks, (a, b) => {
54+
export const sortNetworks = (networksToSort: Network[]) =>
55+
A.sort(networksToSort, (a, b) => {
5656
const aOrder = orderedNetworksSymbols.indexOf(a.symbol);
5757
const bOrder = orderedNetworksSymbols.indexOf(b.symbol);
5858

@@ -68,8 +68,11 @@ export const filterTestnetNetworks = (
6868
return networkSymbols.filter(networkSymbol => !isTestnet(networkSymbol));
6969
};
7070

71-
export const filterBlacklistedNetworks = (networks: Network[], allowList: NetworkSymbol[]) =>
72-
networks.filter(
71+
export const filterBlacklistedNetworks = (
72+
networksToFilter: Network[],
73+
allowList: NetworkSymbol[],
74+
) =>
75+
networksToFilter.filter(
7376
network =>
7477
!discoveryBlacklist.includes(network.symbol) || allowList.includes(network.symbol),
7578
);

0 commit comments

Comments
 (0)