Skip to content

Commit b2c8dec

Browse files
authored
fix: only show substreams possible network instead of everything (#1331)
1 parent a70ac44 commit b2c8dec

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.changeset/smart-cycles-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
only allow mainnet for substreams in network selection for init

packages/cli/src/protocols/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class Protocol {
7474
}
7575

7676
static availableNetworks() {
77-
let networks = immutable.fromJS({
77+
return immutable.fromJS({
7878
arweave: ['arweave-mainnet'],
7979
ethereum: [
8080
'mainnet',
@@ -124,16 +124,6 @@ export default class Protocol {
124124
'arweave' | 'ethereum' | 'near' | 'cosmos' | 'substreams',
125125
immutable.List<string>
126126
>;
127-
128-
const allNetworks: string[] = [];
129-
// eslint-disable-next-line unicorn/no-array-for-each
130-
networks.forEach(value => {
131-
allNetworks.push(...value);
132-
});
133-
134-
networks = networks.set('substreams', immutable.List(allNetworks));
135-
136-
return networks;
137127
}
138128

139129
static normalizeName(name: ProtocolName) {

0 commit comments

Comments
 (0)