Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv committed Nov 27, 2024
1 parent 181ff12 commit 0617788
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 10 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@ import { getDefaultConfig } from '@rainbow-me/rainbowkit';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { baseSepolia, optimismSepolia } from 'viem/chains';
import { WagmiProvider } from 'wagmi';
import { http, WagmiProvider } from 'wagmi';

import App from './App';

if (!import.meta.env.VITE_PROJECT_ID) {
throw new Error('VITE_PROJECT_ID environment variable is required');
}
const projectID = import.meta.env.VITE_PROJECT_ID;

export const SUPPORTED_CHAINS = [baseSepolia, optimismSepolia];

const config = getDefaultConfig({
appName: 'Identity on chain platform',
projectId: projectID,
chains: [optimismSepolia, baseSepolia],
transports: SUPPORTED_CHAINS.reduce(
(obj, chain) => ({ ...obj, [chain.id]: http() }),
{}
),
ssr: false,
});

Expand Down
8 changes: 0 additions & 8 deletions src/services/eas/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { GraphQLClient } from 'graphql-request';

export const easBaseUrl = import.meta.env.VITE_API_GRAPHQL_URL;

export const chainIdToGraphQLEndpoint: { [key: number]: string } = {
Expand All @@ -19,9 +17,3 @@ export const chainIdToGraphQLEndpoint: { [key: number]: string } = {
};

export const ATTESTER_ADDRESS = import.meta.env.VITE_EAS_ATTESTER_ADDRESS;

if (!easBaseUrl) {
throw new Error('VITE_API_GRAPHQL_URL is not defined');
}

export const graphQLClient = new GraphQLClient(easBaseUrl);

0 comments on commit 0617788

Please sign in to comment.