Skip to content

Commit 2cdc6b3

Browse files
Update SDK provider in Dynamic setup (#2027)
* Update SDK provider in Dynamic setup * update features
1 parent b5efc99 commit 2cdc6b3

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

sdk/quickstart/javascript-dynamic.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can set up the SDKs in the following ways:
1919

2020
Features include:
2121

22-
- **Dual SDK integration** - Seamlessly combine MetaMask and Dynamic SDKs.
22+
- **MetaMask SDK built into Dynamic** - Use MetaMask SDK features directly within the Dynamic SDK.
2323
- **Wallet connection** - Connect to MetaMask wallet with enhanced features.
2424
- **Mobile experience** - Optimized for both desktop and mobile users.
2525
- **TypeScript support** - Full type safety and modern development experience.
@@ -162,34 +162,16 @@ Set up your providers in `app/providers.tsx`:
162162
"use client";
163163
164164
import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
165-
import { EthereumWalletConnectors, IEthereum } from "@dynamic-labs/ethereum";
165+
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
166166
import { DynamicWagmiConnector } from "@dynamic-labs/wagmi-connector";
167-
import { MetaMaskSDK } from "@metamask/sdk";
168167
import { WagmiProvider } from "wagmi";
169168
import { config } from "@/wagmi.config";
170169
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
171-
import { useEffect } from "react";
172170
173171
export function Providers({ children }: { children: React.ReactNode }) {
174172
175173
const queryClient = new QueryClient();
176174
177-
useEffect(() => {
178-
if (typeof window === "undefined") return;
179-
180-
const MMSDK = new MetaMaskSDK({
181-
dappMetadata: {
182-
name: "MetaMask Dynamic Integration",
183-
url: window.location.href,
184-
},
185-
});
186-
187-
const ethereum = MMSDK.getProvider();
188-
if (ethereum) {
189-
window.ethereum = ethereum as unknown as IEthereum;
190-
}
191-
}, []);
192-
193175
return (
194176
<DynamicContextProvider
195177
settings={{

0 commit comments

Comments
 (0)