Skip to content

Commit cf16fa3

Browse files
authored
feat: add walletconnect (#1392)
1 parent 6d3b523 commit cf16fa3

File tree

1 file changed

+17
-0
lines changed
  • governance/xc_admin/packages/xc_admin_frontend/pages

1 file changed

+17
-0
lines changed

governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
SolletExtensionWalletAdapter,
1414
SolletWalletAdapter,
1515
TorusWalletAdapter,
16+
WalletConnectWalletAdapter,
17+
WalletConnectWalletAdapterConfig,
1618
} from '@solana/wallet-adapter-wallets'
1719
import { clusterApiUrl } from '@solana/web3.js'
1820
import { DefaultSeo } from 'next-seo'
@@ -24,6 +26,20 @@ import { ClusterProvider } from '../contexts/ClusterContext'
2426
import SEO from '../next-seo.config'
2527
import '../styles/globals.css'
2628

29+
const walletConnectConfig: WalletConnectWalletAdapterConfig = {
30+
network: WalletAdapterNetwork.Mainnet,
31+
options: {
32+
relayUrl: 'wss://relay.walletconnect.com',
33+
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
34+
metadata: {
35+
name: 'Pyth Proposals',
36+
description: 'Vote on Pyth Improvement Proposals',
37+
url: 'https://proposals.pyth.network/',
38+
icons: ['https://pyth.network/token.svg'],
39+
},
40+
},
41+
}
42+
2743
function MyApp({ Component, pageProps }: AppProps) {
2844
// Can be set to 'devnet', 'testnet', or 'mainnet-beta'
2945
// const network = WalletAdapterNetwork.Devnet
@@ -44,6 +60,7 @@ function MyApp({ Component, pageProps }: AppProps) {
4460
new LedgerWalletAdapter(),
4561
new SolletWalletAdapter(),
4662
new SolletExtensionWalletAdapter(),
63+
new WalletConnectWalletAdapter(walletConnectConfig),
4764
],
4865
[]
4966
)

0 commit comments

Comments
 (0)