Skip to content

Commit

Permalink
remove header
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Jan 9, 2025
1 parent ce7a0ed commit adf2274
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 168 deletions.
2 changes: 0 additions & 2 deletions examples/next/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { DelegateAccount } from "components/DelegateAccount";
import { ColorModeToggle } from "components/ColorModeToggle";
import { Profile } from "components/Profile";
import { LookupControllers } from "components/LookupControllers";
import Header from "components/Header";

export default function Home() {
return (
Expand All @@ -17,7 +16,6 @@ export default function Home() {
</h2>
<ColorModeToggle />
</div>
<Header />
<Profile />
<Transfer />
<ManualTransferEth />
Expand Down
140 changes: 0 additions & 140 deletions examples/next/src/components/Header.tsx

This file was deleted.

52 changes: 26 additions & 26 deletions packages/controller/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ export default class ControllerProvider extends BaseProvider {

const chains = new Map<ChainId, Chain>();

for (const chain of options.chains) {
let chainId: ChainId | undefined;
const url = new URL(chain.rpcUrl);
const parts = url.pathname.split("/");

if (parts.includes("starknet")) {
if (parts.includes("mainnet")) {
chainId = constants.StarknetChainId.SN_MAIN;
} else if (parts.includes("sepolia")) {
chainId = constants.StarknetChainId.SN_SEPOLIA;
}
} else if (parts.length >= 3) {
const projectName = parts[2];
if (parts.includes("katana")) {
chainId = `WP_${projectName.toUpperCase()}` as ChainId;
} else if (parts.includes("mainnet")) {
chainId = `GG_${projectName.toUpperCase()}` as ChainId;
}
}

if (!chainId) {
throw new Error(`Chain ${chain.rpcUrl} not supported`);
}

chains.set(chainId, chain);
}
// for (const chain of options.chains) {
// let chainId: ChainId | undefined;
// const url = new URL(chain.rpcUrl);
// const parts = url.pathname.split("/");

// if (parts.includes("starknet")) {
// if (parts.includes("mainnet")) {
// chainId = constants.StarknetChainId.SN_MAIN;
// } else if (parts.includes("sepolia")) {
// chainId = constants.StarknetChainId.SN_SEPOLIA;
// }
// } else if (parts.length >= 3) {
// const projectName = parts[2];
// if (parts.includes("katana")) {
// chainId = `WP_${projectName.toUpperCase()}` as ChainId;
// } else if (parts.includes("mainnet")) {
// chainId = `GG_${projectName.toUpperCase()}` as ChainId;
// }
// }

// if (!chainId) {
// throw new Error(`Chain ${chain.rpcUrl} not supported`);
// }

// chains.set(chainId, chain);
// }

this.chains = chains;
this.selectedChain = options.defaultChainId;
Expand Down

0 comments on commit adf2274

Please sign in to comment.