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 (cherry-pick): Fix race condition validating ERC20 transfer (blockaid) (#28487) #28500

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Nov 15, 2024

Same as #28497, but based off the new Version-v12.7.1

Description

Cherry-pick #28487

Open in GitHub Codespaces

Related issues

Fixes: #28434

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.

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.

<!--
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**
Fixed race condition when validating ERC20 transfer and enabled ERC20
transfer blockaid e2e.

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

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

## **Related issues**

Fixes: #28434

## **Manual testing steps**

1. Go to this the test dapp
2. Click and reject (fast ) all types of requests in the section: PPOM -
Malicious Transactions and Signatures
3. Should not get stuck in the loader

## **Screenshots/Recordings**

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

### **Before**

[all PPOM
signatures.webm](https://github.com/user-attachments/assets/b59a965a-f5e9-44e6-93a5-9058cd164933)

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

### **After**

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

## **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.
@danjm danjm force-pushed the cherry-pick-fix-race-condition-ppom-validation branch from 66a9471 to 7eaeff7 Compare November 15, 2024 18:27
@danjm danjm merged commit d1b0f87 into Version-v12.7.1 Nov 15, 2024
69 of 70 checks passed
@danjm danjm deleted the cherry-pick-fix-race-condition-ppom-validation branch November 15, 2024 20:36
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants