Skip to content

Commit

Permalink
fix(connect-kit): WalletConnectV2 connecting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
runjuu committed Jun 24, 2023
1 parent 39bd249 commit 5755d80
Show file tree
Hide file tree
Showing 3 changed files with 4,258 additions and 9,873 deletions.
2 changes: 2 additions & 0 deletions packages/connect-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"@mantine/core": "^6",
"@mantine/hooks": "^6",
"@mantine/notifications": "^6",
"@wagmi/connectors": "^2.3.0",
"@web3modal/ethereum": "^2.4.7",
"canvas-confetti": "^1",
"check-password-strength": "^2",
"classnames": "^2",
Expand Down
7 changes: 6 additions & 1 deletion packages/connect-kit/src/create-wagmi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { crossbell } from "wagmi/chains";
import { publicProvider } from "wagmi/providers/public";
import { InjectedConnector } from "wagmi/connectors/injected";
import { MetaMaskConnector } from "wagmi/connectors/metaMask";
import { w3mProvider } from "@web3modal/ethereum";

import {
CoinbaseWalletConnector,
Expand All @@ -31,7 +32,11 @@ export function createWagmiConfig({
}: GetDefaultClientConfigOptions): Config {
const { chains, publicClient, webSocketPublicClient } = configureChains(
[crossbell],
[publicProvider()],
[
walletConnectV2ProjectId
? w3mProvider({ projectId: walletConnectV2ProjectId })
: publicProvider(),
],
{ pollingInterval: 1_000 }
);

Expand Down

1 comment on commit 5755d80

@vercel
Copy link

@vercel vercel bot commented on 5755d80 Jun 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

crossbell-universe – ./

crossbell-universe-crossbell.vercel.app
crossbell-dev.vercel.app
crossbell-universe-git-main-crossbell.vercel.app

Please sign in to comment.