Skip to content

Commit 125fbae

Browse files
committed
Update SDK provider in Web3Auth setup
1 parent 7b0a27e commit 125fbae

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

sdk/quickstart/javascript-web3auth.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ Set up your providers in `app/providers.tsx`:
8888
"use client";
8989
9090
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
91-
import { type ReactNode, useState, useEffect } from "react";
91+
import { type ReactNode, useState } from "react";
9292
import { Web3AuthProvider } from "@web3auth/modal/react";
9393
import { WagmiProvider } from "@web3auth/modal/react/wagmi";
94-
import { MetaMaskSDK } from "@metamask/sdk";
9594
9695
type Props = {
9796
children: ReactNode;
@@ -100,22 +99,6 @@ type Props = {
10099
export function Providers({ children }: Props) {
101100
const [queryClient] = useState(() => new QueryClient());
102101
103-
useEffect(() => {
104-
if (typeof window === "undefined") return;
105-
106-
const MMSDK = new MetaMaskSDK({
107-
dappMetadata: {
108-
name: "MetaMask Web3Auth Integration",
109-
url: window.location.href,
110-
},
111-
});
112-
113-
const ethereum = MMSDK.getProvider();
114-
if (ethereum) {
115-
window.ethereum = ethereum as unknown as IEthereum;
116-
}
117-
}, []);
118-
119102
return (
120103
<Web3AuthProvider
121104
config={{

0 commit comments

Comments
 (0)