forked from spruceid/siwe-oidc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3a6f52
commit 29a55e3
Showing
3 changed files
with
1,573 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,44 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import { WagmiConfig, createConfig, mainnet } from "wagmi"; | ||
import { WagmiProvider, createConfig, http, fallback } from "wagmi"; | ||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
import { mainnet } from "wagmi/chains"; | ||
|
||
import { getDefaultConfig } from "connectkit"; | ||
import App from "./App"; | ||
import "./index.css"; | ||
const queryClient = new QueryClient(); | ||
|
||
const config = createConfig( | ||
getDefaultConfig({ | ||
// Required API Keys | ||
infuraId: process.env.INFURA_ID, | ||
walletConnectProjectId: process.env.WALLET_CONNECT_ID ?? '', | ||
chains: [mainnet], | ||
// infuraId: process.env.INFURA_ID, | ||
|
||
walletConnectProjectId: process.env.WALLET_CONNECT_ID ?? "", | ||
|
||
// Required | ||
appName: "SIWE | Devfolio", | ||
appUrl: "https://devfolio.co", // your app's url | ||
appIcon: "https://siwe.devfolio.co/favicon.png", // your app's logo,no bigger than 1024x1024px (max. 1MB) | ||
autoConnect: false, | ||
// autoConnect: false, | ||
|
||
chains: [mainnet], | ||
transports: { | ||
[mainnet.id]: fallback([ | ||
http(`https://mainnet.infura.io/v3/${process.env.INFURA_ID}`), | ||
// http(`https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_ID}`), | ||
http(), | ||
]), | ||
}, | ||
}) | ||
); | ||
|
||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( | ||
<React.StrictMode> | ||
<WagmiConfig config={config}> | ||
<App /> | ||
</WagmiConfig> | ||
<WagmiProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<App /> | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
</React.StrictMode> | ||
); |
Oops, something went wrong.