diff --git a/packages/services/indexer/CHANGELOG.md b/packages/services/indexer/CHANGELOG.md index 693670b22c..c5885b8044 100644 --- a/packages/services/indexer/CHANGELOG.md +++ b/packages/services/indexer/CHANGELOG.md @@ -585,6 +585,12 @@ - utils: extractProjectIdFromAccessKey +## 2.0.0 + +### Major Changes + +- changeset + ## 1.10.14 ### Patch Changes diff --git a/wagmi-project/src/main.tsx b/wagmi-project/src/main.tsx index d999e1a932..77ee47679e 100644 --- a/wagmi-project/src/main.tsx +++ b/wagmi-project/src/main.tsx @@ -9,7 +9,9 @@ import { config } from './wagmi.ts' import './index.css' -globalThis.Buffer = Buffer +if (!globalThis.Buffer) { + globalThis.Buffer = Buffer +} const queryClient = new QueryClient() diff --git a/wagmi-project/src/wagmi.ts b/wagmi-project/src/wagmi.ts index 43cf231934..1f8714a242 100644 --- a/wagmi-project/src/wagmi.ts +++ b/wagmi-project/src/wagmi.ts @@ -2,12 +2,21 @@ import { http, createConfig } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' import { coinbaseWallet, injected, walletConnect } from 'wagmi/connectors' +const wcProjectId = import.meta.env.VITE_WC_PROJECT_ID + +if (!wcProjectId) { + // Fail fast with a clear error instead of an opaque runtime failure inside walletConnect + throw new Error( + 'VITE_WC_PROJECT_ID is not set. Please define it in your environment to enable WalletConnect.', + ) +} + export const config = createConfig({ chains: [mainnet, sepolia], connectors: [ injected(), coinbaseWallet(), - walletConnect({ projectId: import.meta.env.VITE_WC_PROJECT_ID }), + walletConnect({ projectId: wcProjectId }), ], transports: { [mainnet.id]: http(),