From dacd439c21e9132d49323a367ea1c4e352900497 Mon Sep 17 00:00:00 2001 From: Kirill Klimenko Date: Mon, 18 Mar 2024 22:33:08 +0100 Subject: [PATCH] Prettier --- .../menus/AccountDisplay/MenuItemNetwork.tsx | 2 +- .../NetworkConfig/web3-modal.config.ts | 17 +++++---- src/providers/Providers.tsx | 36 ++++++++++--------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/components/ui/menus/AccountDisplay/MenuItemNetwork.tsx b/src/components/ui/menus/AccountDisplay/MenuItemNetwork.tsx index 51a1bc5aff..90ea5cb844 100644 --- a/src/components/ui/menus/AccountDisplay/MenuItemNetwork.tsx +++ b/src/components/ui/menus/AccountDisplay/MenuItemNetwork.tsx @@ -45,7 +45,7 @@ export function MenuItemNetwork() { cursor="pointer" onChange={async e => { e.preventDefault(); - switchChain({chainId: Number(e.target.value)}); + switchChain({ chainId: Number(e.target.value) }); }} value={chainId} > diff --git a/src/providers/NetworkConfig/web3-modal.config.ts b/src/providers/NetworkConfig/web3-modal.config.ts index e24db832ff..df16c31410 100644 --- a/src/providers/NetworkConfig/web3-modal.config.ts +++ b/src/providers/NetworkConfig/web3-modal.config.ts @@ -1,6 +1,6 @@ -import { QueryClient } from '@tanstack/react-query' -import { defaultWagmiConfig } from '@web3modal/wagmi/react/config' -import { http } from 'wagmi'; +import { QueryClient } from '@tanstack/react-query'; +import { defaultWagmiConfig } from '@web3modal/wagmi/react/config'; +import { http } from 'wagmi'; import { hardhat, sepolia, mainnet, Chain } from 'wagmi/chains'; import { supportedChains } from './NetworkConfigProvider'; @@ -22,13 +22,16 @@ const wagmiMetadata = { icons: [`${import.meta.env.VITE_APP_SITE_URL}favicon.icon`], }; - export const wagmiConfig = defaultWagmiConfig({ chains: supportedWagmiChains as [Chain, ...Chain[]], projectId: walletConnectProjectId, metadata: wagmiMetadata, transports: { - [mainnet.id]: http(`https://eth-mainnet.g.alchemy.com/v2/${import.meta.env.VITE_APP_ALCHEMY_MAINNET_API_KEY}`), - [sepolia.id]: http(`https://eth-sepolia.g.alchemy.com/v2/${import.meta.env.VITE_APP_ALCHEMY_SEPOLIA_API_KEY}`) - } + [mainnet.id]: http( + `https://eth-mainnet.g.alchemy.com/v2/${import.meta.env.VITE_APP_ALCHEMY_MAINNET_API_KEY}`, + ), + [sepolia.id]: http( + `https://eth-sepolia.g.alchemy.com/v2/${import.meta.env.VITE_APP_ALCHEMY_SEPOLIA_API_KEY}`, + ), + }, }); diff --git a/src/providers/Providers.tsx b/src/providers/Providers.tsx index 0c1e193006..d2069630a7 100644 --- a/src/providers/Providers.tsx +++ b/src/providers/Providers.tsx @@ -1,6 +1,6 @@ import { ApolloProvider } from '@apollo/client'; import { ChakraProvider } from '@chakra-ui/react'; -import { QueryClientProvider } from '@tanstack/react-query' +import { QueryClientProvider } from '@tanstack/react-query'; import { createWeb3Modal } from '@web3modal/wagmi/react'; import { ReactNode, useEffect } from 'react'; import { ToastContainer } from 'react-toastify'; @@ -12,7 +12,11 @@ import { FractalErrorBoundary, initErrorLogging } from '../helpers/errorLogging' import { AppProvider } from './App/AppProvider'; import EthersContextProvider from './Ethers'; import { NetworkConfigProvider } from './NetworkConfig/NetworkConfigProvider'; -import { wagmiConfig, walletConnectProjectId, queryClient } from './NetworkConfig/web3-modal.config'; +import { + wagmiConfig, + walletConnectProjectId, + queryClient, +} from './NetworkConfig/web3-modal.config'; if (walletConnectProjectId) { createWeb3Modal({ wagmiConfig, projectId: walletConnectProjectId }); @@ -31,20 +35,20 @@ export default function Providers({ children }: { children: ReactNode }) { }> - - - - - - {children} - - - + + + + + + {children} + + +