Skip to content

Commit

Permalink
Move kitConfig to config
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Apr 25, 2024
1 parent 7130da2 commit bd512dd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 39 deletions.
40 changes: 2 additions & 38 deletions examples/next/src/app/Web3Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,10 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { WagmiProvider } from 'wagmi'
// import { KitProvider } from '@0xsequence/kit'

import { config } from './config'
import { wagmiConfig /*, kitConfig */ } from './config'

const queryClient = new QueryClient()

// const kitConfig: KitConfig = {
// defaultTheme: 'dark',
// signIn: {
// projectName: 'Kit Demo'
// // logoUrl: 'sw-logo-white.svg',
// // useMock: isDebugMode
// },
// displayedAssets: [
// // Native token
// {
// contractAddress: '0x0000000000000000000000000000000000000000',
// chainId: 42170
// },
// // Native token
// {
// contractAddress: '0x0000000000000000000000000000000000000000',
// chainId: 421614
// },
// // Waas demo NFT
// {
// contractAddress: '0x0d402c63cae0200f0723b3e6fa0914627a48462e',
// chainId: 42170
// },
// // Waas demo NFT
// {
// contractAddress: '0x0d402c63cae0200f0723b3e6fa0914627a48462e',
// chainId: 421614
// },
// // Skyweaver assets
// {
// contractAddress: '0x631998e91476da5b870d741192fc5cbc55f5a52e',
// chainId: 137
// }
// ]
// }

export interface Web3ProviderProps {
children: React.ReactNode
}
Expand All @@ -52,7 +16,7 @@ export const Web3Provider = (props: Web3ProviderProps) => {
const { children } = props

return (
<WagmiProvider config={config}>
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
{/* <KitProvider config={kitConfig}>{children}</KitProvider> */}
{children}
Expand Down
39 changes: 38 additions & 1 deletion examples/next/src/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CreateConnectorFn, createConfig, http } from 'wagmi'
import { Transport } from 'viem'
import { arbitrumNova, arbitrumSepolia, mainnet, polygon } from 'viem/chains'
import { getDefaultConnectors } from '@0xsequence/kit-connectors'
// import { KitConfig } from '@0xsequence/kit'

const walletConnectProjectId = 'c65a6cb1aa83c4e24500130f23a437d8'
const projectAccessKey = 'AQAAAAAAAEGvyZiWA9FMslYeG_yayXaHnSI'
Expand Down Expand Up @@ -36,9 +37,45 @@ const connectors: CreateConnectorFn[] = [
// : [])
]

export const config = createConfig({
export const wagmiConfig = createConfig({
chains,
transports,
connectors,
ssr: true // For Next.js SSR support
})

// export const kitConfig: KitConfig = {
// defaultTheme: 'dark',
// signIn: {
// projectName: 'Kit Demo'
// // logoUrl: 'sw-logo-white.svg',
// // useMock: isDebugMode
// },
// displayedAssets: [
// // Native token
// {
// contractAddress: '0x0000000000000000000000000000000000000000',
// chainId: 42170
// },
// // Native token
// {
// contractAddress: '0x0000000000000000000000000000000000000000',
// chainId: 421614
// },
// // Waas demo NFT
// {
// contractAddress: '0x0d402c63cae0200f0723b3e6fa0914627a48462e',
// chainId: 42170
// },
// // Waas demo NFT
// {
// contractAddress: '0x0d402c63cae0200f0723b3e6fa0914627a48462e',
// chainId: 421614
// },
// // Skyweaver assets
// {
// contractAddress: '0x631998e91476da5b870d741192fc5cbc55f5a52e',
// chainId: 137
// }
// ]
// }

0 comments on commit bd512dd

Please sign in to comment.