Skip to content

Commit

Permalink
Fix parsing chain id from slot rpcUrl (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
broody authored Jan 15, 2025
1 parent cec808a commit fee85b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/controller/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit fee85b1

Please sign in to comment.