Skip to content

Commit

Permalink
Merge pull request #76 from EveripediaNetwork/fix/wallets
Browse files Browse the repository at this point in the history
chore: restructure wallet arrangement
  • Loading branch information
Adebesin-Cell authored Nov 26, 2024
2 parents 73bb045 + 88622fa commit 02e667c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-geese-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@everipedia/iq-login": minor
---

Removes default wallets and retained only metamask and web3auth
18 changes: 7 additions & 11 deletions src/components/iq-login-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
getDefaultConfig,
getDefaultWallets,
RainbowKitProvider,
} from "@rainbow-me/rainbowkit";
import { getDefaultConfig, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import type React from "react";
import { cookieToInitialState, WagmiProvider } from "wagmi";
Expand All @@ -15,6 +11,7 @@ import {
} from "../lib/integrations/web3-auth-connector";
import { structuralSharing } from "@wagmi/core/query";
import { Web3AuthProvider } from "./web3-auth-provider";
import { metaMaskWallet } from "@rainbow-me/rainbowkit/wallets";

if (!process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID) {
throw new Error("NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID is not set");
Expand All @@ -32,13 +29,12 @@ export const defaultConfig = getDefaultConfig({
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID,
chains: [chain],
wallets: [
...getDefaultWallets({
appName: "IQ.wiki",
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID,
}).wallets,
{
groupName: "More",
wallets: [() => rainbowWeb3AuthConnector({ web3AuthInstance })],
groupName: "Recommended",
wallets: [
() => rainbowWeb3AuthConnector({ web3AuthInstance }),
metaMaskWallet,
],
},
],
multiInjectedProviderDiscovery: false,
Expand Down

0 comments on commit 02e667c

Please sign in to comment.