Skip to content

Commit

Permalink
Fix parsing chain id from slot rpcUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Jan 14, 2025
1 parent cec808a commit a2b0357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/controller/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ 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 a2b0357

Please sign in to comment.