From fee85b16fca8de084e9ca1b7738cfcbdd7d6df43 Mon Sep 17 00:00:00 2001 From: Yun Date: Tue, 14 Jan 2025 16:27:04 -1000 Subject: [PATCH] Fix parsing chain id from slot rpcUrl (#1274) --- 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; } }