Skip to content

Commit b23655c

Browse files
committed
fix(frontend): resolve React hydration error #418 and WalletConnect URL mismatch
- wagmi config: add ssr: true so wallet reconnect defers until after hydration. Prevents React error #418 (server renders "Connect Wallet", client hydrated with connected address — DOM mismatch crashed the app). - WalletConnect metadata.url: nexucore.xyz → www.nexucore.xyz to match actual page origin. Mismatched origin causes WalletConnect to silently reject connections.
1 parent 5c0d37c commit b23655c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/lib/wagmi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ export const polkadotHubTestnet = {
1515

1616
export const config = createConfig({
1717
chains: [polkadotHubTestnet],
18+
ssr: true, // defer wallet reconnect until after hydration — prevents React error #418
1819
connectors: [
1920
injected(),
2021
walletConnect({
2122
projectId: "327cde52817024c462716ebabea9cb1e",
2223
metadata: {
2324
name: "DotLend",
2425
description: "Non-custodial money market on Polkadot Hub",
25-
url: "https://nexucore.xyz",
26-
icons: ["https://nexucore.xyz/favicon.ico"],
26+
url: "https://www.nexucore.xyz",
27+
icons: ["https://www.nexucore.xyz/favicon.ico"],
2728
},
2829
}),
2930
],

0 commit comments

Comments
 (0)