Skip to content

Commit f2d88e0

Browse files
committed
Sort supported networks by name + unhide Soneium Testnet
1 parent 09d9c64 commit f2d88e0

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

website/src/supportedNetworks.tsx

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,41 +25,39 @@ export async function getSupportedNetworks() {
2525
)
2626
}
2727

28-
return Array.from(SupportedNetworkMap.values()).flatMap((network) =>
29-
Array.from(network.chains)
30-
.flatMap((chain) => {
31-
const supportedOnStudio = chain.productDeployStatus.studio === ChainProductStatus.ALLOWED
32-
const integrationType = ['evm', 'near', 'cosmos', 'osmosis', 'ar'].includes(chain.network)
33-
? chain.network
34-
: 'substreams'
28+
return Array.from(SupportedNetworkMap.values())
29+
.flatMap((network) =>
30+
Array.from(network.chains)
31+
.flatMap((chain) => {
32+
const supportedOnStudio = chain.productDeployStatus.studio === ChainProductStatus.ALLOWED
33+
const integrationType = ['evm', 'near', 'cosmos', 'osmosis', 'ar'].includes(chain.network)
34+
? chain.network
35+
: 'substreams'
3536

36-
if (
37-
!chain.graphCliName ||
38-
(!supportedOnStudio && integrationType !== 'substreams') ||
39-
chain.uid === 'evm-1946'
40-
) {
41-
return []
42-
}
37+
if (!chain.graphCliName || (!supportedOnStudio && integrationType !== 'substreams')) {
38+
return []
39+
}
4340

44-
const fullySupportedOnNetwork =
45-
network.id === 'evm' && fullySupportedNetworkIds.includes(`eip155:${chain.chainId}`)
41+
const fullySupportedOnNetwork =
42+
network.id === 'evm' && fullySupportedNetworkIds.includes(`eip155:${chain.chainId}`)
4643

47-
return [
48-
{
49-
uid: chain.uid,
50-
name: chain.name,
51-
cliName: chain.graphCliName,
52-
chainId: chain.chainId,
53-
testnet: chain.testnet,
54-
supportedOnStudio,
55-
fullySupportedOnNetwork,
56-
substreams: chain.substreams ?? [],
57-
integrationType,
58-
},
59-
]
60-
})
61-
.filter(Boolean),
62-
)
44+
return [
45+
{
46+
uid: chain.uid,
47+
name: chain.name,
48+
cliName: chain.graphCliName,
49+
chainId: chain.chainId,
50+
testnet: chain.testnet,
51+
supportedOnStudio,
52+
fullySupportedOnNetwork,
53+
substreams: chain.substreams ?? [],
54+
integrationType,
55+
},
56+
]
57+
})
58+
.filter(Boolean),
59+
)
60+
.sort((a, b) => a.name.localeCompare(b.name))
6361
}
6462

6563
export function SupportedNetworksTable({ networks }: { networks: Awaited<ReturnType<typeof getSupportedNetworks>> }) {

0 commit comments

Comments
 (0)