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

fix: Disable next button if input is invalid for token approval #6634

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

blackdevelopa
Copy link
Contributor

@blackdevelopa blackdevelopa commented Jun 19, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description
When approving an erc20 token, if input has an error, disable next button. Ideally, this might not happen for most devices as the keyboard is set to numeric, however some android devices might still display alphabets.

Screenshots/Recordings
Before:

Screen.Recording.2023-06-19.at.13.02.10.mov

After

Screen.Recording.2023-06-19.at.13.00.54.mov

If applicable, add screenshots and/or recordings to visualize the before and after of your change

Issue

Progresses #6635

Checklist

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

@blackdevelopa blackdevelopa requested a review from a team as a code owner June 19, 2023 11:56
@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.

@blackdevelopa blackdevelopa self-assigned this Jun 19, 2023
@blackdevelopa blackdevelopa added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-confirmations-secure-ux-PR PR from the confirmations team labels Jun 19, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

50.0% 50.0% Coverage
0.0% 0.0% Duplication

@blackdevelopa blackdevelopa added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jun 19, 2023
@seaona
Copy link
Contributor

seaona commented Jun 20, 2023

@blackdevelopa just 2 small comments from QA:

  • Whenever we enter a negative number, I can see how the message below displays This contract allows the site to spend 654 from your current balance

image

  • Whenever we enter a number in scientific notation, I can see how the message below displays a message as if the input was valid i.e. This contract allows the site to spend 10 from your current balance plus 990 you might have in the future..

image

I think in both cases we should show the standard message Only enter a number that you are comfortable with .... like we do in Extension. What do you think @blackdevelopa @bschorchit ?

image

image

@seaona seaona removed the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Jun 20, 2023
@seaona
Copy link
Contributor

seaona commented Jun 20, 2023

After discussing with @blackdevelopa , we've decided that the copy changes can be made in the separate task below, as they are out of scope of this bug fix

https://github.com/MetaMask/MetaMask-planning/issues/685

@seaona seaona added release-7.2.0 QA Passed A successful QA run through has been done labels Jun 20, 2023
@seaona seaona merged commit d4598b8 into main Jun 20, 2023
23 checks passed
@seaona seaona deleted the disable_cta_if_error_token_approval branch June 20, 2023 09:36
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 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-7.2.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants