Skip to content

fix: use http transport instead of webSocket to avoid eager connections#255

Merged
brendanjryan merged 2 commits intomainfrom
brendan/lazy-websocket-transport
Apr 8, 2026
Merged

fix: use http transport instead of webSocket to avoid eager connections#255
brendanjryan merged 2 commits intomainfrom
brendan/lazy-websocket-transport

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 8, 2026

Switch wagmi config from webSocket() to http() for moderato and devnet transports. The WebSocket was opened eagerly on every page load — including pages with no wallet interaction.

  • Replace webSocket('wss://rpc.moderato.tempo.xyz')http('https://rpc.moderato.tempo.xyz')
  • Replace webSocket(tempoDevnet.rpcUrls.default.webSocket[0])http(tempoDevnet.rpcUrls.default.http[0])
  • Remove unused webSocket import from wagmi

Prompted by: Brendan

Co-authored-by: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d6e1a-2a8e-7257-a027-d6c2cb562b8b
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Apr 8, 2026 5:45pm

Request Review

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
@brendanjryan brendanjryan merged commit 79ed66f into main Apr 8, 2026
9 checks passed
@brendanjryan brendanjryan deleted the brendan/lazy-websocket-transport branch April 8, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants