Skip to content

Commit 498fb6d

Browse files
committed
common: also add chain aliases stripped of their -mainnet suffix
1 parent 61db0ce commit 498fb6d

File tree

1 file changed

+4
-0
lines changed
  • packages/indexer-common/src/indexer-management

1 file changed

+4
-0
lines changed

packages/indexer-common/src/indexer-management/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ async function buildCaip2MappingsFromRegistry() {
239239
}
240240
for (const alias of network.aliases) {
241241
caip2ByChainAlias[alias] = network.caip2Id
242+
if (alias.endsWith('-mainnet')) {
243+
const aliasWithoutSuffix = alias.replace('-mainnet', '')
244+
caip2ByChainAlias[aliasWithoutSuffix] = network.caip2Id
245+
}
242246
}
243247
const chainId = parseInt(network.caip2Id.split(':')[1])
244248
if (

0 commit comments

Comments
 (0)