Skip to content

Commit

Permalink
fix: network and default value
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st committed Dec 18, 2024
1 parent 69b2340 commit 8df45ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions example/app/components/Example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export const Example = () => {
console.log("isPending", isPending);
const yourContract =
chain?.id && chain.id in deployedContracts
? deployedContracts[chain.id as 11155111 | 31337].YourContract
: deployedContracts["11155111"].YourContract;
? deployedContracts[chain.id as keyof typeof deployedContracts]
.YourContract
: deployedContracts[11155420].YourContract;

const { data: totalCounter } = useReadContract({
...yourContract,
Expand Down
4 changes: 2 additions & 2 deletions example/app/wagmiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createClient, http } from "viem";
import { rainbowkitBurnerWallet } from "burner-connector";

// Use this if you want to enable session storage
// rainbowkitBurnerWallet.useSessionStorage = false;
// rainbowkitBurnerWallet.useSessionStorage = true;

const wallets = [metaMaskWallet, rainbowkitBurnerWallet];
const walletConnectProjectID = "3a8170812b534d0ff9d794f19a901d64";
Expand All @@ -21,7 +21,7 @@ const wagmiConnectors = connectorsForWallets(
{
appName: "scaffold-eth-2",
projectId: walletConnectProjectID,
},
}
);

export const chains = [optimismSepolia, hardhat] as const;
Expand Down

0 comments on commit 8df45ed

Please sign in to comment.