-
Notifications
You must be signed in to change notification settings - Fork 0
/
providers.js
55 lines (48 loc) · 1.35 KB
/
providers.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"use client";
import * as React from "react";
import {
RainbowKitProvider,
getDefaultWallets,
getDefaultConfig,
darkTheme,
} from "@rainbow-me/rainbowkit";
import {
argentWallet,
trustWallet,
ledgerWallet,
} from "@rainbow-me/rainbowkit/wallets";
//importing the chains we need (here, just Sepolia)
import {
sepolia
} from "wagmi/chains";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { WagmiProvider } from "wagmi";
const { wallets } = getDefaultWallets();
export const config = getDefaultConfig({
appName: "ENS",
projectId: "9fd0244dfe57c0208d0f6a60e0b73542",
// the above value needs to be replaced
wallets: [
...wallets,
{
groupName: "Other",
wallets: [argentWallet, trustWallet, ledgerWallet],
},
],
chains: [
sepolia
],
ssr: true,
});
// TanStack Query is a library that makes it very easy to fetch, cache and handle data.
// It gives you declarative, always-up-to-date auto-managed queries and mutations.
export const queryClient = new QueryClient();
export function Providers({ children }) {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider theme={darkTheme()}>{children}</RainbowKitProvider>
</QueryClientProvider>
</WagmiProvider>
);
}