Skip to content

Commit

Permalink
fear: add others connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbenoit-richez committed Oct 2, 2023
1 parent c13b6f3 commit 7dbfc03
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -36,12 +41,23 @@ type AppProps = NextAppProps & { colorScheme: ColorScheme; locale: string }

const queryClient = new QueryClient({})

// const [readOnly, readOnlyHooks] = getReadOnlyConnector(customChains);
const dashbordChains: ChainSelectConfig<RealtChains> = {
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
}
);

Expand Down

0 comments on commit 7dbfc03

Please sign in to comment.