@@ -15,18 +15,13 @@ import Topbar from "@/components/Topbar";
15
15
//Raimbow Kit
16
16
import "@rainbow-me/rainbowkit/styles.css" ;
17
17
import {
18
- getDefaultWallets ,
19
18
connectorsForWallets ,
20
19
RainbowKitProvider ,
21
20
} from "@rainbow-me/rainbowkit" ;
22
- import {
23
- braveWallet ,
24
- injectedWallet ,
25
- coinbaseWallet ,
26
- safeWallet ,
27
- } from "@rainbow-me/rainbowkit/wallets" ;
21
+ import { injectedWallet , coinbaseWallet } from "@rainbow-me/rainbowkit/wallets" ;
28
22
import { MDXProvider } from "@mdx-js/react" ;
29
23
import Components from "@/components/mdx/Components" ;
24
+ import { RainbowKitSiweNextAuthProvider } from "@rainbow-me/rainbowkit-siwe-next-auth" ;
30
25
31
26
// Config
32
27
// ========================================================
@@ -38,21 +33,12 @@ const { chains, publicClient, webSocketPublicClient } = configureChains(
38
33
[ publicProvider ( ) ]
39
34
) ;
40
35
41
- const { wallets } = getDefaultWallets ( {
42
- appName : "Developer DAO Academy" ,
43
- projectId : "123456789" ,
44
- chains,
45
- } ) ;
46
-
47
36
const connectors = connectorsForWallets ( [
48
- ...wallets ,
49
37
{
50
- groupName : "Other " ,
38
+ groupName : "Recommended " ,
51
39
wallets : [
52
- braveWallet ( { chains } ) ,
53
40
injectedWallet ( { chains } ) ,
54
- coinbaseWallet ( { chains, appName : "Developer DAO Academy" } ) , // "Next dApp" is the name of the app
55
- safeWallet ( { chains } ) ,
41
+ coinbaseWallet ( { chains, appName : "Developer DAO Academy" } ) ,
56
42
] ,
57
43
} ,
58
44
] ) ;
@@ -67,6 +53,10 @@ const config = createConfig({
67
53
webSocketPublicClient,
68
54
} ) ;
69
55
56
+ const getSiweMessageOptions = ( ) => ( {
57
+ statement : "Sign in to Developer DAO Academy" ,
58
+ } ) ;
59
+
70
60
// App Wrapper Component
71
61
// ========================================================
72
62
const MyApp : AppType < { session : Session | null } > = ( {
@@ -76,25 +66,24 @@ const MyApp: AppType<{ session: Session | null }> = ({
76
66
return (
77
67
< ChakraProvider theme = { theme } >
78
68
< WagmiConfig config = { config } >
79
- < RainbowKitProvider
80
- //modalSize="compact"
81
- coolMode = { true }
82
- chains = { chains }
83
- // theme={theme}
84
- >
85
- < SessionProvider session = { session } >
86
- < Box
87
- p = "1.25em"
88
- px = "5%"
89
- mx = { { base : "2rem" , md : "6rem" , lg : "10rem" } }
90
- >
91
- < Topbar />
92
- < MDXProvider components = { Components } >
93
- < Component { ...pageProps } /> { " " }
94
- </ MDXProvider >
95
- </ Box >
96
- </ SessionProvider >
97
- </ RainbowKitProvider >
69
+ < SessionProvider session = { session } refetchInterval = { 0 } >
70
+ < RainbowKitSiweNextAuthProvider
71
+ getSiweMessageOptions = { getSiweMessageOptions }
72
+ >
73
+ < RainbowKitProvider chains = { chains } >
74
+ < Box
75
+ p = "1.25em"
76
+ px = "5%"
77
+ mx = { { base : "2rem" , md : "6rem" , lg : "10rem" } }
78
+ >
79
+ < Topbar />
80
+ < MDXProvider components = { Components } >
81
+ < Component { ...pageProps } /> { " " }
82
+ </ MDXProvider >
83
+ </ Box >
84
+ </ RainbowKitProvider >
85
+ </ RainbowKitSiweNextAuthProvider >
86
+ </ SessionProvider >
98
87
</ WagmiConfig >
99
88
</ ChakraProvider >
100
89
) ;
0 commit comments