From 29efe1404df2ad8b9119b0b8a1fbe29666cddd50 Mon Sep 17 00:00:00 2001 From: broody Date: Tue, 14 Jan 2025 13:53:28 -1000 Subject: [PATCH] Fix parsing chain id from slot rpcUrl --- packages/controller/src/controller.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/controller/src/controller.ts b/packages/controller/src/controller.ts index e162aea54..dd21a3300 100644 --- a/packages/controller/src/controller.ts +++ b/packages/controller/src/controller.ts @@ -46,9 +46,13 @@ export default class ControllerProvider extends BaseProvider { } else if (parts.length >= 3) { const projectName = parts[2]; if (parts.includes("katana")) { - chainId = `WP_${projectName.toUpperCase()}` as ChainId; + chainId = `WP_${projectName + .toUpperCase() + .replace(/-/g, "_")}` as ChainId; } else if (parts.includes("mainnet")) { - chainId = `GG_${projectName.toUpperCase()}` as ChainId; + chainId = `GG_${projectName + .toUpperCase() + .replace(/-/g, "_")}` as ChainId; } }