feat: add fallback WebSocket connection to localhost:8545#74
Open
naps62-self-hosted-claude[bot] wants to merge 4 commits intomainfrom
Open
feat: add fallback WebSocket connection to localhost:8545#74naps62-self-hosted-claude[bot] wants to merge 4 commits intomainfrom
naps62-self-hosted-claude[bot] wants to merge 4 commits intomainfrom
Conversation
When the ethui desktop app is unavailable, the extension now falls back to connecting to ws://localhost:8545 (standard Ethereum JSON-RPC port). This allows using the extension with any local Ethereum node when ethui is not running. Key changes: - Reorganized background connection code into separate modules: - appConnection.ts: handles ethui app connection - fallbackConnection.ts: handles fallback localhost:8545 connection - Extension periodically checks if ethui comes back online (every 5s) and automatically switches back to the main app connection - Badge shows "F" in amber when using fallback mode - Popup shows a fallback mode indicator when connected via fallback - Connection state now tracks the source (app vs fallback) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unused type exports that were flagged by ts-unused-exports: - MessageHandler, DisconnectHandler from appConnection.ts - ConnectionState, ConnectionSource, getConnectionSource from connectionState.ts - MessageHandler, getFallbackEndpoint from fallbackConnection.ts - ConnectionSource from useConnectionState.ts Keep ConnectionState exported from useConnectionState as it's used by DisconnectedView. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ws://localhost:8545(standard Ethereum JSON-RPC port)Changes
appConnection.ts: handles ethui app connectionfallbackConnection.ts: handles fallback localhost:8545 connectionTest plan
Generated with Claude Code