1
1
'use client' ;
2
2
import { WalletKitButton } from '@totejs/walletkit' ;
3
3
import { UploadKitButton } from '@node-real/greenfield-uploadkit' ;
4
- import { chainList } from './chains' ;
5
- import { WagmiConfig , createConfig } from 'wagmi' ;
6
- import {
7
- SwitchNetworkModal ,
8
- WalletKitOptions ,
9
- WalletKitProvider ,
10
- getDefaultConfig ,
11
- } from '@totejs/walletkit' ;
12
- import { trustWallet , metaMask , walletConnect } from '@totejs/walletkit/wallets' ;
13
- import { UploadKitOptions , UploadKitProvider } from '@node-real/greenfield-uploadkit' ;
14
- import { client } from './client' ;
15
4
16
5
import '@node-real/greenfield-uploadkit/styles.css' ;
17
6
import '@totejs/walletkit/styles.css' ;
18
7
19
- const config = createConfig (
20
- getDefaultConfig ( {
21
- autoConnect : true ,
22
- appName : 'WalletKit' ,
23
-
24
- /* WC 2.0 requires a project ID (get one here: https://cloud.walletconnect.com/sign-in) */
25
- walletConnectProjectId : '22d482af814af0b8d5ba3d394a28c5fc' ,
26
-
27
- chains : chainList ,
28
- connectors : [ trustWallet ( ) , metaMask ( ) , walletConnect ( ) ] ,
29
- } ) ,
30
- ) ;
31
-
32
- const options : WalletKitOptions = {
33
- initialChainId : 5600 ,
34
- } ;
35
-
36
- const uploadOptions : UploadKitOptions = {
37
- client : client ,
38
- visibility : 'VISIBILITY_TYPE_PRIVATE' ,
39
- } ;
40
8
export default function Home ( ) {
41
9
return (
42
10
< main
@@ -45,16 +13,9 @@ export default function Home() {
45
13
minHeight : '100vh' ,
46
14
} }
47
15
>
48
- < WagmiConfig config = { config } >
49
- < WalletKitProvider options = { options } mode = "light" >
50
- < UploadKitProvider options = { uploadOptions } mode = "light" >
51
- < WalletKitButton />
52
- < div style = { { height : 16 } } > </ div >
53
- < UploadKitButton />
54
- < SwitchNetworkModal />
55
- </ UploadKitProvider >
56
- </ WalletKitProvider >
57
- </ WagmiConfig >
16
+ < WalletKitButton />
17
+ < div style = { { height : 16 } } > </ div >
18
+ < UploadKitButton />
58
19
</ main >
59
20
) ;
60
21
}
0 commit comments