Skip to content

Commit

Permalink
providers
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Aug 13, 2024
1 parent be2b9a3 commit c5ebd22
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions web/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
darkTheme,
lightTheme,
} from "@rainbow-me/rainbowkit";
import { UniversalKitProvider, useEthersSigner } from "@zetachain/universalkit";
import { UniversalKitProvider } from "@zetachain/universalkit";
import { config } from "../wagmi";
import { useTheme, ThemeProvider as NextThemesProvider } from "next-themes";

Expand All @@ -24,33 +24,8 @@ const ThemeProvider = ({ children }: { children: React.ReactNode }) => {
};

const WagmiWrapper = ({ children }: { children: React.ReactNode }) => {
const chainId = useChainId();
const { data: walletClient } = useWalletClient({ chainId });
const signer = useEthersSigner({ walletClient });

if (!signer) null;

const zetaConfig = {
network: "testnet",
signer,
chains: {
zeta_testnet: {
api: [
{
url: "https://zetachain-athens.g.allthatnode.com/archive/evm",
type: "evm",
},
],
},
},
};

return (
<UniversalKitProvider
config={config}
client={queryClient}
zetaChainConfig={zetaConfig}
>
<UniversalKitProvider config={config} client={queryClient}>
{children}
</UniversalKitProvider>
);
Expand Down

0 comments on commit c5ebd22

Please sign in to comment.