-
Notifications
You must be signed in to change notification settings - Fork 5.5k
release: Sync v13.11.0 with stable #38183
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
…m fetching list of all accounts balances (#38098) - fix: cp-13.10.1 prevent account list from fetching list of all accounts balances (#38065) <!-- 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** prevent token list from fetching balances for all accounts <!-- 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? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/38065?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: prevent token list from fetching balances for all accounts ## **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 Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Pass `platform: 'extension'` to `TokenBalancesController` and switch the hook’s `updateBalancesFoAccounts` flag to `false`, updating tests accordingly. > > - **Controllers**: > - `TokenBalancesControllerInit` now passes `platform: 'extension'` when constructing `TokenBalancesController`. > - Updated test to assert `platform: 'extension'` is provided. > - **UI Hooks**: > - `useAssetsUpdateAllAccountBalances` switches `updateBalancesFoAccounts(enabledChainIds, false)` (from `true`). > - Updated related tests to expect the new boolean argument and re-render behavior. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6236adc. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [b5eaa85](b5eaa85) Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com>
<!-- 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** fix: dapp-swap comparison fiat rate fetching for native tokens ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: MetaMask/MetaMask-planning#6327 ## **Manual testing steps** 1. Trigger swap including native tokens 2. Check that fait conversion in metrics is correct ## **Screenshots/Recordings** TODO ## **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/main/.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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Fetch fiat rates only for non-native tokens in the dapp-swap comparison hook to correctly handle native assets. > > - **Hooks**: > - Update `ui/pages/confirmations/hooks/transactions/dapp-swap-comparison/useDappSwapUSDValues.ts` to filter out native addresses from `tokenAddresses` before calling `fetchTokenExchangeRates('usd', ...)`, avoiding fiat rate requests for native tokens. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7ff0f9b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ol native token (#38136) - fix: cp-13.10.1 dapp swap fix conversion rate for pol native token (#38102) <!-- 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** Fix conversion rate for POL native token. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6327 ## **Manual testing steps** 1. Trigger swap including POL native token 2. Check that metrics are recorded correctly and dapp-swap UI shows correct values ## **Screenshots/Recordings** TODO ## **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/main/.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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Fixes USD rate lookup for Polygon native token by mapping native address to `0x0000000000000000000000000000000000001010` and adds tests. > > - **Hooks**: > - Update `ui/pages/confirmations/hooks/transactions/dapp-swap-comparison/useDappSwapUSDValues.ts` to adjust fiat rate fetching: > - When `chainId === CHAIN_IDS.POLYGON`, map the native asset address to the rate from `0x0000000000000000000000000000000000001010`. > - Wrap rate fetching in an async function to inject the Polygon-specific mapping. > - **Tests**: > - Enhance `useDappSwapUSDValues.test.ts`: > - Allow `runHook` to accept custom `tokenAddresses` and `mockConfirmation`. > - Add Polygon-specific test asserting correct fiat rates for native POL (`0x...0000`) and `0x0000000000000000000000000000000000001010`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c7fe193. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [0aa98dc](0aa98dc) Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
…solve missing balance state (#38140) - fix: cp-13.10.1 patch TokenBalancesController to resolve missing balance state (#38126) ## **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? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/38126?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix missing native token balances in wallet balance ## **Related issues** Fixes: #38114 ## **Manual testing steps** Onboard or existing user with AccountsAPI enabled 1. Go to a network with native + erc tokens 2. Notice aggregated wallet balance - it should have both native + erc tokens aggregated together for the balance. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://www.loom.com/share/aeccc8e3cef4479da0e9d44fc5ebf4fa ## **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/main/.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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Patches `TokenBalancesController` to use lowercase account addresses for balance reads/writes and wires the patched `@metamask/assets-controllers@88.0.0` via Yarn patch. > > - **Assets Controllers Patch (`@metamask/assets-controllers@88.0.0`)**: > - Normalize `account` to lowercase in `TokenBalancesController` when reading/updating `d.tokenBalances` (cjs/mjs builds), ensuring balance updates are applied. > - **Dependencies**: > - Switch `@metamask/assets-controllers` in `package.json` to a Yarn patch source and add patched entry in `yarn.lock`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 75c9d95. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [a2fe8c4](a2fe8c4) Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
This PR updates the change log for 13.10.1. (Hotfix - no test plan generated.) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates CHANGELOG with 13.10.1 fixes and adjusts version comparison links. > > - **Documentation** (`CHANGELOG.md`): > - **Add `13.10.1` – Fixed**: > - Prevent token list from fetching balances for all accounts. > - Correct dapp-swap comparison fiat rate for native tokens. > - Fix conversion rate for POL native token in dapp-swap. > - Remove unnecessary extension permission. > - Restore missing native token balances in wallet balance. > - **Links**: > - Update `[Unreleased]` compare link to start from `v13.10.1`. > - Add `[13.10.1]` compare link to `v13.10.0...v13.10.1`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b15b274. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
…ew warnings cp-13.10.1 (#38146) - fix: Remove `tabs` permission to avoid new warnings cp-13.10.1 (#38075) ## **Description** The recent addition of the `tabs` permission will result in new permission warnings upon update, which is extremely disruptive and is something we'd never do except as a last resort. The permission wasn't actually needed, and has been removed. This removal uncovered a bug in our Webpack build (the `tabs` permission was erroneously only added for MV2 test builds, but we need it for MV3 test builds as well), which has been fixed. [](https://codespaces.new/MetaMask/metamask-extension/pull/38075?quickstart=1) ## **Changelog** CHANGELOG entry: Remove unnecessary extension permission ## **Related issues** N/A ## **Manual testing steps** Test that the sidepanel still works in general. Particularly with dapp confirmations, and the "Connected status" indicator, and current selected dapp. ## **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** - [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/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes the `tabs` permission from the MV3 base manifest. > > - **Manifest (MV3)**: > - Update `app/manifest/v3/_base.json` to remove `permissions` entry `tabs`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7778231. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [bba4201](bba4201) Co-authored-by: Mark Stacey <mark.stacey@consensys.net>
release: 13.10.1
|
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. |
| "notifications", | ||
| "scripting", | ||
| "storage", | ||
| "tabs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file come from this PR #38075, which was not included in 13.11.0, but was cherry-picked in 13.10.1.
…nce state (#38126) ## **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? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/38126?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix missing native token balances in wallet balance ## **Related issues** Fixes: #38114 ## **Manual testing steps** Onboard or existing user with AccountsAPI enabled 1. Go to a network with native + erc tokens 2. Notice aggregated wallet balance - it should have both native + erc tokens aggregated together for the balance. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://www.loom.com/share/aeccc8e3cef4479da0e9d44fc5ebf4fa ## **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/main/.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/main/.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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Patches `TokenBalancesController` to use lowercase account keys when reading/writing `tokenBalances`, and wires the patch via a Yarn patched dependency for `@metamask/assets-controllers@89.0.1`. > > - **Assets Controllers Patch**: > - Normalize `account` to lowercase in `TokenBalancesController` (`dist/TokenBalancesController.{cjs,mjs}`) when checking and setting `d.tokenBalances[account][chainId][tokenAddress]`. > - **Build/Deps**: > - Apply Yarn patch for `@metamask/assets-controllers@89.0.1` via `package.json` and update lockfile to reference the patched package. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d4370d9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
| @@ -0,0 +1,48 @@ | |||
| diff --git a/dist/TokenBalancesController.cjs b/dist/TokenBalancesController.cjs | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file come from this PR #38126, which was not included in 13.11.0, but was cherry-picked in 13.10.1.
| "@metamask/announcement-controller": "^8.0.0", | ||
| "@metamask/approval-controller": "^8.0.0", | ||
| "@metamask/assets-controllers": "^89.0.1", | ||
| "@metamask/assets-controllers": "patch:@metamask/assets-controllers@npm%3A89.0.1#~/.yarn/patches/@metamask-assets-controllers-npm-89.0.1-02fa7acd54.patch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file come from this PR #38126, which was not included in 13.11.0, but was cherry-picked in 13.10.1.
| linkType: hard | ||
|
|
||
| "@metamask/assets-controllers@npm:^89.0.1": | ||
| "@metamask/assets-controllers@npm:89.0.1": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file come from this PR #38126, which was not included in 13.11.0, but was cherry-picked in 13.10.1.
Builds ready [2d124e1]
UI Startup Metrics (1242 ± 112 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
|
|
||
| if (args.test && args.manifest_version === 2) { | ||
| // test builds need "tabs" permission for switchToWindowWithTitle in MV2 | ||
| if (args.test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file come from this PR #38075, which was not included in 13.11.0, but was cherry-picked in 13.10.1.
Builds ready [39ceeb2]
UI Startup Metrics (1239 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
|
No release label on PR. Adding release label release-13.11.0 on PR, as PR was added to branch 13.11.0 when release was cut. |
Description
The diff we observe in this stable sync PR comes from these PRs, which were merged to main AFTER the 13.11.0 release cut, but were cherry-picked into 13.10.1:
tabspermission to avoid new warnings cp-13.10.1 #38075 (cherry-pick PR)Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Applies a patch to normalize account casing in token balance updates, removes MV3 "tabs" permission while adding it for tests, updates the changelog, and wires the yarn patch.
@metamask/assets-controllersTokenBalancesController(dist/*.cjs|mjs) to write balances under lower-casedaccountkeys and only update when changed.tabsfrom MV3app/manifest/v3/_base.jsonpermissions.development/webpack/.../ManifestPlugin/helpers.ts) to always addtabspermission for--testbuilds (no MV2 check) and keep dev/test manifest key injection.13.10.1section with fixes and correct comparison links.@metamask/assets-controllersto a Yarn patch inpackage.json; updateyarn.lockaccordingly.Written by Cursor Bugbot for commit 39ceeb2. This will update automatically on new commits. Configure here.