From cf16fa32113278da4b5fb6d78d31aa84862ef208 Mon Sep 17 00:00:00 2001 From: guibescos <59208140+guibescos@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:15:56 +0000 Subject: [PATCH] feat: add walletconnect (#1392) --- .../packages/xc_admin_frontend/pages/_app.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx b/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx index f78edfc3..dd901f6a 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx @@ -13,6 +13,8 @@ import { SolletExtensionWalletAdapter, SolletWalletAdapter, TorusWalletAdapter, + WalletConnectWalletAdapter, + WalletConnectWalletAdapterConfig, } from '@solana/wallet-adapter-wallets' import { clusterApiUrl } from '@solana/web3.js' import { DefaultSeo } from 'next-seo' @@ -24,6 +26,20 @@ import { ClusterProvider } from '../contexts/ClusterContext' import SEO from '../next-seo.config' import '../styles/globals.css' +const walletConnectConfig: WalletConnectWalletAdapterConfig = { + network: WalletAdapterNetwork.Mainnet, + options: { + relayUrl: 'wss://relay.walletconnect.com', + projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, + metadata: { + name: 'Pyth Proposals', + description: 'Vote on Pyth Improvement Proposals', + url: 'https://proposals.pyth.network/', + icons: ['https://pyth.network/token.svg'], + }, + }, +} + function MyApp({ Component, pageProps }: AppProps) { // Can be set to 'devnet', 'testnet', or 'mainnet-beta' // const network = WalletAdapterNetwork.Devnet @@ -44,6 +60,7 @@ function MyApp({ Component, pageProps }: AppProps) { new LedgerWalletAdapter(), new SolletWalletAdapter(), new SolletExtensionWalletAdapter(), + new WalletConnectWalletAdapter(walletConnectConfig), ], [] )