Skip to content

Commit e52728b

Browse files
committed
Update SDK provider in Dynamic setup
1 parent 47a160f commit e52728b

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

sdk/quickstart/javascript-dynamic.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -161,34 +161,16 @@ Set up your providers in `app/providers.tsx`:
161161
"use client";
162162
163163
import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
164-
import { EthereumWalletConnectors, IEthereum } from "@dynamic-labs/ethereum";
164+
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
165165
import { DynamicWagmiConnector } from "@dynamic-labs/wagmi-connector";
166-
import { MetaMaskSDK } from "@metamask/sdk";
167166
import { WagmiProvider } from "wagmi";
168167
import { config } from "@/wagmi.config";
169168
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
170-
import { useEffect } from "react";
171169
172170
export function Providers({ children }: { children: React.ReactNode }) {
173171
174172
const queryClient = new QueryClient();
175173
176-
useEffect(() => {
177-
if (typeof window === "undefined") return;
178-
179-
const MMSDK = new MetaMaskSDK({
180-
dappMetadata: {
181-
name: "MetaMask Dynamic Integration",
182-
url: window.location.href,
183-
},
184-
});
185-
186-
const ethereum = MMSDK.getProvider();
187-
if (ethereum) {
188-
window.ethereum = ethereum as unknown as IEthereum;
189-
}
190-
}, []);
191-
192174
return (
193175
<DynamicContextProvider
194176
settings={{

0 commit comments

Comments
 (0)