-
Notifications
You must be signed in to change notification settings - Fork 0
add RPC fallback #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add RPC fallback #26
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,8 @@ | ||
| CRE_HELPER_SERVER_URL=http://localhost:3000 | ||
| CRE_HELPER_API_KEY=replace-me | ||
| VITE_WALLETCONNECT_PROJECT_ID=replace-me | ||
|
|
||
| # Optional comma-separated overrides for RPC priority. | ||
| VITE_SEPOLIA_RPC_URLS=https://sepolia.drpc.org,https://ethereum-sepolia-rpc.publicnode.com | ||
| VITE_BASE_SEPOLIA_RPC_URLS=https://sepolia.base.org,https://base-sepolia-rpc.publicnode.com | ||
| VITE_ARBITRUM_SEPOLIA_RPC_URLS=https://sepolia-rollup.arbitrum.io/rpc,https://arbitrum-sepolia-rpc.publicnode.com | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,17 +1,55 @@ | ||||||||||
| import { getDefaultConfig } from "@rainbow-me/rainbowkit"; | ||||||||||
| import { cookieStorage, createStorage, http } from "wagmi"; | ||||||||||
| import { cookieStorage, createStorage, fallback, http } from "wagmi"; | ||||||||||
| import { arbitrumSepolia, baseSepolia, sepolia } from "wagmi/chains"; | ||||||||||
|
|
||||||||||
| const RPC_TIMEOUT_MS = 2_500; | ||||||||||
|
|
||||||||||
| const splitRpcUrls = (value: string | undefined) => | ||||||||||
| value | ||||||||||
| ?.split(",") | ||||||||||
| .map((url) => url.trim()) | ||||||||||
| .filter(Boolean) ?? []; | ||||||||||
|
Comment on lines
+10
to
+11
|
||||||||||
| .map((url) => url.trim()) | |
| .filter(Boolean) ?? []; | |
| ?.map((url) => url.trim()) | |
| ?.filter(Boolean) ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
.env.example, settingVITE_WALLETCONNECT_PROJECT_ID=replace-mewill override the in-code fallback ("demo") and likely break WalletConnect for anyone who copies this file verbatim. Consider leaving it blank/commented out or setting it todemowith a note that a real project id is required for production.