Skip to content

fix:[cherry-pick][V12.1.0] Permit ellipsis fixes (3/4) - add ellipsis for permit fiat values (#26001) #26515

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

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Aug 19, 2024

Description

Cherry-pick fix: add ellipsis for permit fiat values (#26001) into v12.1.0

no line changes

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

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/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

Before

After

Pre-merge author checklist

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.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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**

<!--
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.
@digiwand digiwand requested review from a team as code owners August 19, 2024 15:55
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Aug 19, 2024
@digiwand digiwand added the DO-NOT-MERGE Pull requests that should not be merged label Aug 19, 2024
@digiwand
Copy link
Contributor Author

digiwand commented Aug 19, 2024

The fiat logic may have an issue. Decimals are not applied to the fiat value and USDC balance is different from fiat conversion. This is the same in the relevant ticket but with TetherUSD #26001

@metamaskbot
Copy link
Collaborator

Builds ready [74e2912]
Page Load Metrics (216 ± 242 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint802841445627
domContentLoaded118839199
load422405216503242
domInteractive118839199

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.65%. Comparing base (621d39c) to head (74e2912).

Files Patch % Lines
...typed-sign/permit-simulation/permit-simulation.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           Version-v12.1.0   #26515      +/-   ##
===================================================
+ Coverage            69.64%   69.65%   +0.01%     
===================================================
  Files                 1363     1363              
  Lines                48444    48468      +24     
  Branches             13357    13367      +10     
===================================================
+ Hits                 33735    33758      +23     
- Misses               14709    14710       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@digiwand digiwand removed the DO-NOT-MERGE Pull requests that should not be merged label Aug 19, 2024
@digiwand
Copy link
Contributor Author

digiwand commented Aug 19, 2024

I verified that this PR does not introduce any new bugs. This PR is okay to merge.

Version 12.0.0 - old Permit page

Version 12.0.0 - redesign Permit page

Version 12.1.0 - before and after any Permit cherry-picks were currently added (before this PR)

Looks like we fixed a decimal issue somewhere between now and the latest we have on develop. I will search for the fix.

@pedronfigueiredo pedronfigueiredo merged commit 32edb6d into Version-v12.1.0 Aug 19, 2024
74 checks passed
@pedronfigueiredo pedronfigueiredo deleted the cherry-pick-12.1.0-2842-missing-ellipsis-for-fiat-values-in-permits branch August 19, 2024 16:54
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2024
@digiwand digiwand added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants