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: sending an ERC20 token with an amount with more decimals than the token decimal, results in nothing #6754

Merged

Conversation

blackdevelopa
Copy link
Contributor

@blackdevelopa blackdevelopa commented Jul 7, 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
Whenever we are trying to Send an ERC20 token, if we input an amount with more decimals than the contract is expecting, whenever we click Next, nothing happens. The improved solution is to mirror the extension by rounding off the number if it the fraction length is more than the token decimal

Screenshots/Recordings

Before:

235894032-42019be5-f7a0-421a-b450-504a23af58e7.mp4

After:

Screen.Recording.2023-07-07.at.04.43.56.mov

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

Issue

Progresses #6324

Checklist

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

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 changed the title fix: sending an ERC20 token with an amount with more decimals than the ones defined on the Token Standard, results in nothing fix: sending an ERC20 token with an amount with more decimals than the token decimal, results in nothing Jul 7, 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 Jul 7, 2023
@blackdevelopa blackdevelopa self-assigned this Jul 7, 2023
@blackdevelopa blackdevelopa requested a review from jpuri July 7, 2023 16:22
jpuri
jpuri previously approved these changes Jul 7, 2023
cryptotavares
cryptotavares previously approved these changes Jul 10, 2023
@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 Jul 10, 2023
@seaona
Copy link
Contributor

seaona commented Jul 11, 2023

@blackdevelopa I can see how the issue is fixed now 🔥 PR can be merged

send-token-decimals-erc20.mp4

There is a related issue affecting deeplinks, in case you want to grab this in the future as it's related work. It's #6323

@seaona seaona 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 Jul 11, 2023
digiwand
digiwand previously approved these changes Jul 11, 2023
@blackdevelopa blackdevelopa force-pushed the 6324/sending-erc20-with-higher-token-decimal-error branch from e18b272 to 606f8d1 Compare July 11, 2023 15:50
@blackdevelopa blackdevelopa requested a review from a team as a code owner July 12, 2023 07:16
@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@blackdevelopa blackdevelopa merged commit 555d8cc into main Jul 12, 2023
20 checks passed
@blackdevelopa blackdevelopa deleted the 6324/sending-erc20-with-higher-token-decimal-error branch July 12, 2023 07:42
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 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.4.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

5 participants