Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/bal still loading #186

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

numdinkushi
Copy link

Description @bayological

Key changes

  1. I added a 'isFetchingBalance' from the store to keep track of the wallet balance state, if fetched or not
  2. I added a ref to the form so as to trigger the submit button when 'balance is still loading' is rendered so it automatically changes (with the help of the useEffect)
  3. Instead of the lastUpdated props, i used the isFetchingBalance props in the useFormValidator hook like so:
    if (isFetchingBalance) return { fromTokenId: 'Balance still loading' };

Other changes

using the isFetchingBalance props, i render 'Retrieving balance' on the button.
Describe any minor or "drive-by" changes here.

Tested

An explanation of how the changes were tested or an explanation as to why they don't need to be.

Related issues

  • Fixes #issue number here

Checklist before requesting a review

    • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • The PR title follows the conventions
  • I have run the regression tests

Copy link

vercel bot commented Jan 18, 2025

@numdinkushi is attempting to deploy a commit to the Mento Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant