-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pilot-app): disconnect wallet (#564)
* restructure context for wallets * make tests more robust
- Loading branch information
1 parent
33a1d0c
commit 3de469b
Showing
5 changed files
with
76 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
import { getDefaultConfig } from 'connectkit' | ||
import type { PropsWithChildren } from 'react' | ||
import { createConfig, injected, WagmiProvider } from 'wagmi' | ||
import { metaMask, walletConnect } from 'wagmi/connectors' | ||
|
||
const queryClient = new QueryClient() | ||
|
||
const WALLETCONNECT_PROJECT_ID = '0f8a5e2cf60430a26274b421418e8a27' | ||
|
||
const wagmiConfig = createConfig( | ||
getDefaultConfig({ | ||
appName: 'Zodiac Pilot', | ||
walletConnectProjectId: WALLETCONNECT_PROJECT_ID, | ||
connectors: [ | ||
injected(), | ||
metaMask(), | ||
walletConnect({ projectId: WALLETCONNECT_PROJECT_ID }), | ||
], | ||
}), | ||
) | ||
|
||
export const WalletProvider = ({ children }: PropsWithChildren) => ( | ||
<QueryClientProvider client={queryClient}> | ||
<WagmiProvider config={wagmiConfig}>{children}</WagmiProvider> | ||
</QueryClientProvider> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { ConnectWallet } from './ConnectWallet' | ||
export { WalletProvider } from './WalletProvider' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters