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

Approval error when insufficient balance #5440

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

tommasini
Copy link
Contributor

@tommasini tommasini commented Dec 29, 2022

Description
The token approval modal was not showing the insufficient balance error and not disabling the button when a user requested token approval with insufficient balance.

Proposed Solution
When updating the transaction state with the gas properties, validate if there is enough balance and saving the error on the component state.

Screenshots/Recordings

Test Cases
Case1:

Case2:

  • Change to ethereum mainnet
  • Go to uniswap
  • Try to swap a token to ETH like polygon or APE (Or another that you didn't approved already)
  • The expected behaviour it's possible to approve if you are with a funded wallet

Issue

Progresses #5427

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@tommasini tommasini requested a review from a team as a code owner December 29, 2022 16:37
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@tommasini tommasini added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 29, 2022
Copy link
Contributor

@Fatxx Fatxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tommasini tommasini added needs-qa Any New Features that needs a full manual QA prior to being added to a release. Mobile QA board and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Dec 29, 2022
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🌮 🌮 🌮

@cortisiko cortisiko added QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Jan 9, 2023
@cortisiko cortisiko merged commit df48d12 into main Jan 9, 2023
@cortisiko cortisiko deleted the fix/5427-approve-token-confirm branch January 9, 2023 22:23
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-5.14.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants