Skip to content

Commit df128c6

Browse files
Update utils.ts (#1000)
* Update utils.ts REVIEW REQUIRED. Removed hard-coded Token API networks, added what is hopefully an automatic fetch for Token API networks. PLEASE REVIEW THIS PR. It was implemented with advice from Claude. Not sure where these parameters are used, so I am unable to check if it works. Happy to let docs team make this update instead, but on the off chance this is correct feel free to merge. * Update `@pinax/graph-networks-registry` * Remove useless function --------- Co-authored-by: benface <[email protected]>
1 parent e0c4ccc commit df128c6

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

pnpm-lock.yaml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@edgeandnode/go": "^10.2.3",
2424
"@emotion/react": "^11.14.0",
2525
"@graphprotocol/contracts": "^7.3.0",
26-
"@pinax/graph-networks-registry": "^0.6.7",
26+
"@pinax/graph-networks-registry": "^0.7.1",
2727
"@react-hookz/web": "^25.1.1",
2828
"@readme/httpsnippet": "^11.0.0",
2929
"@readme/openapi-parser": "^4.1.0",

website/src/supportedNetworks/utils.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ export const MONO_ICON_NETWORKS = [
2525
'zksync-era-sepolia',
2626
]
2727

28-
// Networks with Token API support (TODO: remove once the registry has this information)
29-
export const TOKEN_API_NETWORKS = [
30-
'mainnet',
31-
'base',
32-
'bsc',
33-
'arbitrum-one',
34-
'matic',
35-
'optimism',
36-
'unichain',
37-
'avalanche',
38-
]
39-
4028
export const getIconVariant = (networkId: string): 'mono' | 'branded' => {
4129
return MONO_ICON_NETWORKS.includes(networkId) ? 'mono' : 'branded'
4230
}
@@ -69,7 +57,7 @@ export async function getSupportedNetworks() {
6957
const subgraphs = Boolean(network.services.subgraphs?.length)
7058
const substreams = Boolean(network.services.substreams?.length)
7159
const firehose = Boolean(network.services.firehose?.length)
72-
const tokenApi = TOKEN_API_NETWORKS.includes(network.id)
60+
const tokenApi = Boolean(network.services.tokenApi?.length)
7361
if (!subgraphs && !substreams && !firehose && !tokenApi) {
7462
return []
7563
}

0 commit comments

Comments
 (0)