Open mykcryptodev opened 1 month ago
Go to the wallet aggregator section of the docs
Notice how the getDefaultConfig is setting a "connectors" key:
Connectors arent available as a key on the getDefaultConfig param:
Object literal may only specify known properties, and 'connectors' does not exist in type 'GetDefaultConfigParameters<[{ blockExplorers: { readonly default: { readonly name: "Basescan"; readonly url: "https://basescan.org"; readonly apiUrl: "https://api.basescan.org/api"; }; }; contracts: { readonly l2OutputOracle: { ...; }; ... 8 more ...; readonly l2ToL1MessagePasser: { ...; }; }; ... 9 more ...; serial...'.ts(2353)
Use createConfig from wagmi to include the connectors like this:
createConfig
const connectors = connectorsForWallets( [ { groupName: 'Recommended Wallet', wallets: [coinbaseWallet], }, { groupName: 'Other Wallets', wallets: [rainbowWallet, metaMaskWallet], }, ], { appName: 'onchainkit', projectId: env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID, }, ); const wagmiConfig = createConfig({ chains: [base], multiInjectedProviderDiscovery: false, connectors, ssr: false, transports: { [base.id]: http(), }, });
requires importing { http, createConfig } from 'wagmi'
also, the props type is missing in the example:
type Props = { children: ReactNode; };
No response
Great point, let me get this prioritized. cc @cpcramer
Describe the bug and the steps to reproduce it
Go to the wallet aggregator section of the docs
Notice how the getDefaultConfig is setting a "connectors" key:
Connectors arent available as a key on the getDefaultConfig param:
What's the expected behavior?
Use
createConfig
from wagmi to include the connectors like this:requires importing { http, createConfig } from 'wagmi'
also, the props type is missing in the example:
What version of the libraries are you using?
No response