Skip to content

Conversation

@chloeYue
Copy link
Contributor

Description

Master sync following v11.10.0

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

chloeYue and others added 19 commits January 25, 2024 17:58
## **Description**

Cherry-picks
8ec8643
to the RC.

This fixes the `getIsLocked` hook, which would previously always return
`false`. We were using the result of `appStateController.isUnlocked`,
but that's a function rather than a boolean.

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
## **Description**

Cherry-picks 7a3d9e2 (Cancel transaction signing from activity list
(#22676)) into Version-v11.10.0

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
… ppom security alert response (#22778)

Solves this problem:

For people on slow networks, the amount of time it takes from "Dapp
button click" -> "Popup notification window appears" might be a problem.
When blockaid is toggled off, and the network is throttled to slow via
the chrome dev tools, I see a ~3 second worse case for this time, but
when blockaid is toggled on, I see a 12 second (or even a bit longer)
worst case scenario for this time.

The risk here is that users unexpectedly see a longer delay then usual,
and so think they need to click the button again, and then get shown
multiple confirmation requests and confirm all of them, leading to fund
loss.

This can happen on either slow internet connections, or if an infura
request is taking longer than usual (which could effect people
regardless of internet connection). Yesterday when I first saw this
issue, I wasn't slowing down my connection, but it still took ~20
seconds to open. Probably a somewhat rare case (because as I mentioned I
didn't notice any problems again until I intentionally throttled the
network requests), but even if it only affected 10% of users only once a
month, that would be enough to get plenty of "why did metamask just take
20 seconds to open a confirmation window?!?" complaints.

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

Fixes:

1. Go to this page...
2.
3.

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

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

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

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

- [ ] 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.
[cherry-pick] Stop doing ppom validation on metamask swaps (#22847)
[cherry-pick] Stop blocking display of transaction approval window on resolution of ppom security alert response (#22778)
Remove unnecessary resolution for the `socks` package. This removes the risk of the resolution causing problems in future updates, reducing maintenance burdens for the team.
…2692)

This PR creates a patch to check for all types of custodian keyrings
that start with the prefix `Custody`

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] 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.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

- [ ] 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.
### Cherry pick of #22997 to v11.10.0. That PR's description is below

Update the hardfork in the transaction common used to estimate L1
optimism fees to London, fixing display of Layer 1 optimsim fees

The bug was that Layer 1 fees were not being displayed on the
confirmation screen for transactions on Optimism.

This was because `estimatedL1Fees` was null, because
`fetchEstimatedL1Fee` was failing, because
`TransactionFactory.fromTxData(txParams, { common })` in
`buildUnserializedTransaction` was throwing an error, because `txParams`
has a `type` === `2`, but EIP-1559 transactions are not supported on the
spurious dragon hardfork, which is what was being used in the `common`
configuration of that `TransactionFactory.fromTxData` call.

This became a problem after
https://github.com/MetaMask/core/pull/3817/files. That PR correctly
fixed a bug which could result in the transaction type being removed
from the `txMeta.txParams` when `addTransaction` in the tx controller
was called. With that bug fix, there was now a `type` present on the
`txParams` that got passed to the aforementioned
`TransactionFactory.fromTxData` call. Prior to that bug fix, there was
no `type` on `txParams` at that point, the ethereumjs-tx
TransactionFactory was treating these transactions as legacy
transactions, and so was constructing a type 0 transaction, and the fact
that the hardfork was spurious dragon was not a problem

This PR fixes the problem by updating the hardfork param used in the
`common` configuration of that `TransactionFactory.fromTxData` call.
This should not have a functional effect, as this will cause no change
in data and value of the tx passed to the smart contract to generate an
fee estimate, except that this may result in more accurate L1 fee
estimates (that is not certain though).

Fixes: #22945

1. Create a transaction on OP Mainnet
2. Click "Fee details" on the confirmation screen
3.  The layer 1 fee details should be visible

![Screenshot from 2024-02-16

09-27-25](https://github.com/MetaMask/metamask-extension/assets/7499938/6c759096-f393-4101-b9af-a3542e313571)

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.
Adding 11.10.0 changelog
## **Description**
Cherry picks:
- [[Bug|Feat] blockaid external link clicked metric update
(](https://github.com/MetaMask/metamask-extension/pull/23022/commits/2f5e64c9e9443988dca7a6beea94f1605f44ef9a)https://github.com/MetaMask/metamask-extension/pull/22631[)](https://github.com/MetaMask/metamask-extension/pull/23022/commits/2f5e64c9e9443988dca7a6beea94f1605f44ef9a)

[2f5e64c](2f5e64c)
- [fix: for realease blocker bugs
(](https://github.com/MetaMask/metamask-extension/pull/23022/commits/9c391caf5b82dc7af3e6fb2459b408f2e90c8ac4)https://github.com/MetaMask/metamask-extension/pull/22874[)](https://github.com/MetaMask/metamask-extension/pull/23022/commits/9c391caf5b82dc7af3e6fb2459b408f2e90c8ac4)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

---------

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
Co-authored-by: Olusegun Akintayo <akintayo.segun@gmail.com>
Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
fix: fix selectedAddress and nftController instantiation (#22856)

Noticed that when you freshly import the extension, usse testDapp to
deploy and mint an NFT, then manually import the NFT. you will be able
to see the NFT. Then when you switch to another account and go back to
the account that has the NFT;
1- you wont be able to see the NFTs you imported earlier 2- When you try
to import them again you will get an error (fired from core when trying
to verify ownership)

Noticed that this was due to core having the wrong userAddress to check
ownership for, and then in metamask.js, the selectedAddress retrieved
does not match the user's selected Address

This behavior is also reported to be on v11.10.0, on this issue:
#22796

Fixes: #22796
Fixes: #22798

1. Remove and reimport the extension
2. Use testDapp to deploy and mint the NFT
3. Add the NFT manually by clicking "import NFT"
4. You should be able to see your newly import NFT
5. Create new account
6. Go back to the account that has the NFT
7. You should be able to see the NFT you imported

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


https://github.com/MetaMask/metamask-extension/assets/10994169/a74cbf0b-014b-4e39-82ac-e8452941fc6e


https://github.com/MetaMask/metamask-extension/assets/10994169/987dbb27-b938-4bce-9b43-4269d714ee33

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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 properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

Co-authored-by: sahar-fehri <sahar.fehri@consensys.net>
Co-authored-by: Monte Lai <monte.lai@consensys.net>
@chloeYue chloeYue added the team-extension-platform Extension Platform team label Feb 20, 2024
@chloeYue chloeYue requested a review from a team as a code owner February 20, 2024 14:29
@github-actions
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.

@codecov
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7a76c27) 68.48% compared to head (e4a0f40) 68.48%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23075   +/-   ##
========================================
  Coverage    68.48%   68.48%           
========================================
  Files         1089     1089           
  Lines        43015    43015           
  Branches     11462    11462           
========================================
  Hits         29455    29455           
  Misses       13560    13560           

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

@metamaskbot
Copy link
Collaborator

Builds ready [e4a0f40]
Page Load Metrics (961 ± 44 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1093251854522
domContentLoaded871352512
load84711679619144
domInteractive871352512
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm danjm merged commit 9a4b132 into develop Feb 21, 2024
@danjm danjm deleted the master-sync branch February 21, 2024 08:56
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
@metamaskbot metamaskbot added the release-11.12.0 Issue or pull request that will be included in release 11.12.0 label Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.12.0 Issue or pull request that will be included in release 11.12.0 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants