From c0c267cbf54b5362bd75ccfede72e33795d88012 Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:30:12 +0000 Subject: [PATCH 1/2] fix: use http transport instead of webSocket to avoid eager connections Co-authored-by: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d6e1a-2a8e-7257-a027-d6c2cb562b8b --- src/wagmi.config.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/wagmi.config.ts b/src/wagmi.config.ts index dd49bc67..0200de91 100644 --- a/src/wagmi.config.ts +++ b/src/wagmi.config.ts @@ -11,7 +11,6 @@ import { createStorage, http, useConnectors, - webSocket, } from 'wagmi' import { KeyManager, webAuthn } from 'wagmi/tempo' import { alphaUsd, betaUsd, pathUsd, thetaUsd } from './components/guides/tokens' @@ -77,16 +76,12 @@ export function getConfig(options: getConfig.Options = {}) { }), transports: { [tempoModerato.id]: withFeePayer( - webSocket('wss://rpc.moderato.tempo.xyz', { - keepAlive: { interval: 1_000 }, - }), + http('https://rpc.moderato.tempo.xyz'), http('https://sponsor.moderato.tempo.xyz'), { policy: 'sign-only' }, ), [tempoDevnet.id]: withFeePayer( - webSocket(tempoDevnet.rpcUrls.default.webSocket[0], { - keepAlive: { interval: 1_000 }, - }), + http(tempoDevnet.rpcUrls.default.http[0]), http('https://sponsor.devnet.tempo.xyz'), { policy: 'sign-only' }, ), From 35069af138a01a95359111fbd1784546ad847559 Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:42:16 +0000 Subject: [PATCH 2/2] fix: use fallback transport instead of removing WebSocket HTTP loads first for fast initial paint, WebSocket upgrades in background for real-time events (useWatchTransfer). Co-Authored-By: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d6e1a-2a8e-7257-a027-d6c2cb562b8b --- src/wagmi.config.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/wagmi.config.ts b/src/wagmi.config.ts index 0200de91..a53a48d9 100644 --- a/src/wagmi.config.ts +++ b/src/wagmi.config.ts @@ -9,8 +9,10 @@ import { type CreateConfigParameters, createConfig, createStorage, + fallback, http, useConnectors, + webSocket, } from 'wagmi' import { KeyManager, webAuthn } from 'wagmi/tempo' import { alphaUsd, betaUsd, pathUsd, thetaUsd } from './components/guides/tokens' @@ -76,12 +78,22 @@ export function getConfig(options: getConfig.Options = {}) { }), transports: { [tempoModerato.id]: withFeePayer( - http('https://rpc.moderato.tempo.xyz'), + fallback([ + http('https://rpc.moderato.tempo.xyz'), + webSocket('wss://rpc.moderato.tempo.xyz', { + keepAlive: { interval: 1_000 }, + }), + ]), http('https://sponsor.moderato.tempo.xyz'), { policy: 'sign-only' }, ), [tempoDevnet.id]: withFeePayer( - http(tempoDevnet.rpcUrls.default.http[0]), + fallback([ + http(tempoDevnet.rpcUrls.default.http[0]), + webSocket(tempoDevnet.rpcUrls.default.webSocket[0], { + keepAlive: { interval: 1_000 }, + }), + ]), http('https://sponsor.devnet.tempo.xyz'), { policy: 'sign-only' }, ),