Skip to content

Conversation

@GuiBibeau
Copy link
Collaborator

Summary

  • Wraps address parsing in try-catch to prevent crashes when invalid addresses are passed to useBalance and useAccount hooks
  • Returns error state through the existing error field instead of throwing uncaught exceptions
  • Logs warnings to console for developer visibility

Test plan

  • Added unit tests for invalid address handling in both useBalance and useAccount
  • Existing tests pass
  • Verified invalid addresses no longer crash the application

Closes #109

… hooks

Wrap address parsing in try-catch to prevent crashes when invalid addresses
are passed. Returns error state and logs warning to console instead of
throwing uncaught exception.

Closes #109
@GuiBibeau GuiBibeau merged commit 78a2a50 into main Jan 5, 2026
7 checks passed
@github-actions github-actions bot mentioned this pull request Jan 5, 2026
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.

[Bug]: useBalance crashes app when given invalid address instead of handling gracefully

2 participants