-
Notifications
You must be signed in to change notification settings - Fork 5k
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: [cherry-pick][V12.1.0] Permit ellipsis fixes (4/4) - Permit ellipsis should use max 15 char (#26458) #26516
Merged
jpuri
merged 2 commits into
Version-v12.1.0
from
cherry-pick-12.1.0-fix-permit-ellipsis-15-char-2
Aug 19, 2024
Merged
fix: [cherry-pick][V12.1.0] Permit ellipsis fixes (4/4) - Permit ellipsis should use max 15 char (#26458) #26516
jpuri
merged 2 commits into
Version-v12.1.0
from
cherry-pick-12.1.0-fix-permit-ellipsis-15-char-2
Aug 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR goal is to add ellipsis to the fiat value if it's more than 15 character in permit simulations. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26001?quickstart=1) ## **Related issues** Fixes: MetaMask/MetaMask-planning#2842 ## **Manual testing steps** 1. Go to cowswap 2. Swap a token with gas-free approve for another token 3. Notice the permit signature screen ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <img width="472" alt="Screenshot 2024-07-22 at 14 40 57" src="https://github.com/user-attachments/assets/c5879989-7719-4e4b-902f-1f57144d8889"> ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Display max 15 characters, not max 15 digits, before ellipsis for amounts shown in Permit pages. Updated to use `shortenString` here. ## **Related issues** Fixes: MetaMask/MetaMask-planning#2845 ## **Manual testing steps** 1. Go to test-dapp 2. Trigger Malicious Permit request 3. Observe ellipsis values in a. spending cap in simulation b. value in the message ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ![CleanShot 2024-08-15 at 21 08 45](https://github.com/user-attachments/assets/020957dd-9204-40b6-afa2-9afacb80d9e0) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
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. |
7 tasks
Base automatically changed from
cherry-pick-12.1.0-2842-missing-ellipsis-for-fiat-values-in-permits
to
Version-v12.1.0
August 19, 2024 16:54
jpuri
approved these changes
Aug 19, 2024
digiwand
added
rc-cherry-picked
release-12.1.0
Issue or pull request that will be included in release 12.1.0
and removed
rc-cherry-picked
labels
Aug 20, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
release-12.1.0
Issue or pull request that will be included in release 12.1.0
team-confirmations
Push issues to confirmations team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Cherry-pick fix: Permit ellipsis should use max 15 char (#26458) into v12.1.0
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2845
Manual testing steps
Screenshots/Recordings
Before
After
There is a decimal issue that will be merged with another cherry-pick
Pre-merge author checklist
Standards.
Pre-merge reviewer checklist