Skip to content

feat(wallet): add error boundary around wallet connector - #1280

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Magrexy:feat/issue-1158-add-error-boundary
Oct 15, 2026
Merged

nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Magrexy:feat/issue-1158-add-error-boundary

Conversation

@Magrexy

@Magrexy Magrexy commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an error boundary around the WalletConnection component so an unexpected render failure in the wallet status UI degrades into a friendly, retryable fallback instead of unmounting the header that hosts it. This keeps the surrounding page usable when wallet state or a browser wallet provider misbehaves.

Problem

WalletConnector renders the connected and disconnected wallet views directly with no error boundary. Any exception thrown while rendering those views propagates upward and takes the whole layout down with it, leaving users without wallet controls and with no way to recover short of reloading the page.

Changes Made

  • Wrapped the render output of src/components/WalletConnector.tsx in the existing ErrorBoundary component from src/components/ui/SimpleErrorBoundary.tsx.
  • Kept the connected/disconnected branching logic unchanged; the boundary now covers both states.

Implementation Details

The existing ErrorBoundary already supplies a fallback panel with a "Try Again" button that resets its internal hasError state, so no new error handling code was introduced. Since ErrorBoundary is a client component, it composes cleanly inside the client-side WalletConnector, and the boundary sits high enough to catch failures from either view without altering their props.

Closes #1158

Closes #1157

Closes #1156

Closes #1155

@drips-wave

drips-wave Bot commented Oct 15, 2026

Copy link
Copy Markdown

@Magrexy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit
nanaf6203-bit merged commit 163cafb into MettaChain:main Oct 15, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants