Skip to content

useBalance hooks should return undefined while loading #1648

@gndelia

Description

@gndelia

Description

The hooks in useBalance are defaulting to zero even when loading. I think it would be even simpler if they just returned the data from useReadContract (similar to returning from useQuery) - so the balance is undefined while loading. This will align with the practices recommended by react-query maintainers (See this article)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions