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/ Selected token information isn't updated if the token is already selected #699

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

PetromirDev
Copy link
Member

@PetromirDev PetromirDev commented Apr 10, 2024

If the tokens are updated, the selected token must also be updated. The problem is that if the amount of the currently selected token gets updated in tokens, selectedToken won't be updated, because it's already selected.

Changes:

  • Fixed the bug
  • Made maxAmount a getter so the amounts don't get out of sync again

The bug in action:

Here, the error message gets the max amount from selectedToken?.amount, while the max button and label above the field get it from transferControllerState.maxAmount.
image

@PetromirDev PetromirDev added the bug Something isn't working label Apr 10, 2024
@PetromirDev PetromirDev requested a review from Ivshti April 10, 2024 10:12
@PetromirDev PetromirDev self-assigned this Apr 10, 2024
@PetromirDev PetromirDev merged commit 6013e87 into v2 Apr 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants