Skip to content

Commit

Permalink
Fix WalletConnect (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree authored Jul 3, 2024
1 parent d0a4478 commit f6c0dfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/council-ui/src/lib/rainbowKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import {
} from "@rainbow-me/rainbowkit/wallets";
import { chains, transports } from "src/lib/wagmi";

const { NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID, NODE_ENV } = process.env;
const walletConnectId = process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID;
const wallets = [injectedWallet, safeWallet, rainbowWallet, metaMaskWallet];

// WalletConnect
if (NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID) {
if (walletConnectId) {
wallets.push(walletConnectWallet);
} else if (NODE_ENV === "development") {
} else if (process.env.NODE_ENV === "development") {
console.warn(
"Missing WalletConnect project ID. Set the NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID variable in your environment to use WalletConnect.",
);
}

export const wagmiConfig = getDefaultConfig({
appName: "Council",
projectId: NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "0",
projectId: walletConnectId || "0",
chains: chains as any,
transports,
wallets: [
Expand Down

0 comments on commit f6c0dfd

Please sign in to comment.