Skip to content

Commit

Permalink
Update for substreams networks with no studio support (#710)
Browse files Browse the repository at this point in the history
* Update for substreams networks with no studio support

* lint
  • Loading branch information
azf20 authored Jun 17, 2024
1 parent c99f2df commit 8fe979d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 11 deletions.
45 changes: 39 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@edgeandnode/common": "^6.10.0",
"@edgeandnode/common": "^6.11.1-remove-injective-studio-support-1718401771108-74c8ecedae5c754047b4248b0a6bce262b8e7a74",
"@edgeandnode/gds": "5.15.0-sunrise-countdown-banner-1718175684308-cb24bd26f94e08877a72d73cbdc7dcb9449a7c9e",
"@edgeandnode/go": "6.23.0-sunrise-countdown-banner-1718175684308-cb24bd26f94e08877a72d73cbdc7dcb9449a7c9e",
"@emotion/react": "^11.11.4",
Expand Down
12 changes: 8 additions & 4 deletions website/src/supportedNetworks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ export async function getSupportedNetworks() {
.map((chain) => {
const supportedOnHostedService = chain.productDeployStatus.hostedService === ChainProductStatus.ALLOWED
const supportedOnStudio = chain.productDeployStatus.studio === ChainProductStatus.ALLOWED
const integrationType = ['evm', 'near', 'cosmos', 'osmosis', 'ar'].includes(chain.network)
? chain.network
: 'substreams'

if (!chain.graphCliName || (!supportedOnStudio && !supportedOnHostedService)) {
if (
!chain.graphCliName ||
(!supportedOnStudio && !supportedOnHostedService && integrationType !== 'substreams')
) {
return null as never // `as never` to work around the `.filter(Boolean)` below not narrowing the type
}

Expand All @@ -48,9 +54,7 @@ export async function getSupportedNetworks() {
supportedOnStudio,
fullySupportedOnNetwork,
substreams: chain.substreams ?? [],
integrationType: ['evm', 'near', 'cosmos', 'osmosis', 'ar'].includes(chain.network)
? chain.network
: 'substreams',
integrationType,
}
})
.filter(Boolean),
Expand Down

0 comments on commit 8fe979d

Please sign in to comment.