Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Sizon committed Jun 23, 2024
1 parent f0ef762 commit 496b880
Show file tree
Hide file tree
Showing 3 changed files with 1,484 additions and 40 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
},
"dependencies": {
"@chainlink/contracts": "^1.1.1",
"@dynamic-labs/ethereum": "^2.2.3",
"@dynamic-labs/sdk-react-core": "^2.2.3",
"@dynamic-labs/wagmi-connector": "^2.2.3",
"@ethersproject/bignumber": "^5.7.0",
"@supabase/ui": "^0.36.5",
"@web3-storage/w3up-client": "^13.1.1",
Expand Down
30 changes: 20 additions & 10 deletions packages/nextjs/components/ScaffoldEthAppWithProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import { useGlobalState } from "~~/services/store/store";
import { wagmiConfig } from "~~/services/web3/wagmiConfig";
import { appChains } from "~~/services/web3/wagmiConnectors";

import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
import { DynamicWagmiConnector } from "@dynamic-labs/wagmi-connector";
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";

const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => {
const price = useNativeCurrencyPrice();
const setNativeCurrencyPrice = useGlobalState(state => state.setNativeCurrencyPrice);
Expand Down Expand Up @@ -46,15 +50,21 @@ export const ScaffoldEthAppWithProviders = ({ children }: { children: React.Reac
}, []);

return (
<WagmiConfig config={wagmiConfig}>
<ProgressBar />
<RainbowKitProvider
chains={appChains.chains}
avatar={BlockieAvatar}
theme={mounted ? (isDarkMode ? lightTheme() : darkTheme()) : lightTheme()}
>
<ScaffoldEthApp>{children}</ScaffoldEthApp>
</RainbowKitProvider>
</WagmiConfig>
<DynamicContextProvider
settings={{
environmentId: 'de7487b9-ba4c-4e93-a5b8-662ee53d48d9',
walletConnectors: [ EthereumWalletConnectors ],
}}
>
<DynamicWagmiConnector>
<ProgressBar />
<DynamicContextProvider
avatar={BlockieAvatar}
theme={mounted ? (isDarkMode ? darkTheme() : lightTheme()) : lightTheme()}
>
<ScaffoldEthApp>{children}</ScaffoldEthApp>
</DynamicContextProvider>
</DynamicWagmiConnector>
</DynamicContextProvider>
);
};
Loading

0 comments on commit 496b880

Please sign in to comment.