File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ const networkConfigs = [
133133 } ,
134134] ;
135135
136+ const getConfig = ( chainId ) =>
137+ networkConfigs . find (
138+ ( networkConfig ) => `${ networkConfig . id } ` === `${ chainId } ` ,
139+ ) ;
140+
136141export const getId = ( idOrName , { allowExperimentalNetworks = false } = { } ) =>
137142 networkConfigs
138143 . filter (
@@ -186,10 +191,11 @@ export const getChainDefaults = (
186191 } ;
187192} ;
188193
194+ export const shouldUploadBulkForThegraph = ( chainId ) =>
195+ getConfig ( chainId ) ?. uploadBulkForThegraph || false ;
196+
189197export const checkImplementedOnChain = ( chainId , featureName ) => {
190- const networkConfig = networkConfigs . find (
191- ( network ) => `${ network . id } ` === `${ chainId } ` ,
192- ) ;
198+ const networkConfig = getConfig ( chainId ) ;
193199 if (
194200 networkConfig ?. notImplemented &&
195201 networkConfig . notImplemented . includes ( featureName )
@@ -216,8 +222,5 @@ networkConfigs.forEach((networkConfig) => {
216222 }
217223} ) ;
218224
219- export const shouldUploadBulkForThegraph = ( id ) =>
220- networkConfigs [ id ] ?. uploadBulkForThegraph || false ;
221-
222225export const THEGRAPH_IPFS_NODE = 'https://ipfs.thegraph.com' ;
223226export const THEGRAPH_IPFS_GATEWAY = THEGRAPH_IPFS_NODE ;
You can’t perform that action at this time.
0 commit comments