Skip to content

useTokenBalance swallows read errors #2

Description

@oliv3rdrt

The hook destructures only data and isLoading from useReadContract and drops the error. When balanceOf reverts (wrong chain, non-token address) the UI just sits on the loading/empty state with no signal to the user. Return error from the hook and render it where the balance is shown.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions