diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index f12ea55..3728c81 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -21,9 +21,14 @@ import { initLanguage, Layout, MantineProviders, - Logo, - availableWebsites, Websites, + ChainSelectConfig, + Chain as RealtChains, + parseAllowedChain, + ChainsID, + CHAINS, + getWalletConnectV2, + getReadOnlyConnector } from '@realtoken/realt-commons' import InitStoreProvider from '../providers/InitStoreProvider' import { modals } from '../components/modals' @@ -36,12 +41,23 @@ type AppProps = NextAppProps & { colorScheme: ColorScheme; locale: string } const queryClient = new QueryClient({}) -// const [readOnly, readOnlyHooks] = getReadOnlyConnector(customChains); +const dashbordChains: ChainSelectConfig = { + allowedChains: parseAllowedChain(ChainsID), + chainsConfig: CHAINS +} + +const env = process.env.NEXT_PUBLIC_ENV ?? "development"; +const walletConnectKey = process.env.NEXT_PUBLIC_WALLET_CONNECT_KEY ?? ""; + +const readOnly = getReadOnlyConnector(dashbordChains); +const walletConnect = getWalletConnectV2(dashbordChains, env, walletConnectKey, false) const libraryConnectors = getConnectors( { metaMask: [metaMask, metaMaskHooks], - gnosisSafe: [gnosisSafe, gnosisHooks] + gnosisSafe: [gnosisSafe, gnosisHooks], + readOnly: readOnly, + walletConnectV2: walletConnect } );