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: [cherrypick][V12.3.0] permit single and batch simulation (3/3 permit simulation fix) #27212

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Sep 17, 2024

Description

Cherry-picks #26684 into V12.3.0

most conflicts pertain to tests

prerequisites before cherry-picking #26684
prerequisite 1: #27186
prerequisite 2: #27187

Open in GitHub Codespaces

Related issues

Fixes: #26591 (PermitSingle)
Fixes: #26592 (PermitBatch)

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.

…erFrom simulation "Spending cap" (#26684)

<!--
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.
-->

Fixes PermitSingle, PermitBatch, PermitTransferFrom,
PermitBatchTransferFrom simulation to use their respective provided
token and amount in token details.

Additionally:
- adjusts styles to have an 8px gap between each "Spending Cap" entry
and right align content
- create PermitSimulationValueDisplay component to separate individual
token contract value logic
- adds tests
- adds sentry error to capture exception in case token isn't provided
for the relevant primaryTypes

dev note: majority of the newlines come from updated and new test
snapshots

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26684?quickstart=1)

Fixes: #26591
(PermitSingle)
Fixes: #26592
(PermitBatch)

Test PermitSingle & PermitBatch with Improved Signature setting enabled

See related issues for repro steps

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<img width="320"
src="https://github.com/user-attachments/assets/aac7fa8c-285a-4d2b-bcec-84c7fc6245bf">
<!-- [screenshots/recordings] -->
See Issue screenshots

<!-- [screenshots/recordings] -->

![image](https://github.com/user-attachments/assets/4564530d-1c3d-430b-b821-15ed0fca6152)

- [ ] 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.

- [ ] 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 added team-confirmations Push issues to confirmations team release-12.3.0 Issue or pull request that will be included in release 12.3.0 labels Sep 17, 2024
@digiwand digiwand requested review from a team as code owners September 17, 2024 12:40
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.

@digiwand digiwand changed the title [cherrypick][V12.3.0] fix permit single and batch simulation fix: [cherrypick][V12.3.0] permit single and batch simulation (2/3 permit simulation fix) Sep 18, 2024
@digiwand digiwand changed the title fix: [cherrypick][V12.3.0] permit single and batch simulation (2/3 permit simulation fix) fix: [cherrypick][V12.3.0] permit single and batch simulation (3/3 permit simulation fix) Sep 18, 2024
@digiwand
Copy link
Contributor Author

update - will not merge into 12.3

closing in favor of #27300

@digiwand digiwand closed this Sep 20, 2024
@digiwand digiwand deleted the cherrypick-12.3.0-fix-permit-single-and-batch-simulation branch September 20, 2024 11:15
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants