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.
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.