-
Notifications
You must be signed in to change notification settings - Fork 5k
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
New Crowdin translations by Github Action #28996
base: develop
Are you sure you want to change the base?
Conversation
bfd46e0
to
48faa78
Compare
48faa78
to
7bcf84b
Compare
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again. Next stepsWhat is a medium CVE?Contains a medium severity Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known medium severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. What is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. What is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. What is a mild CVE?Contains a low severity Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known low severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. What is an AI-detected potential code anomaly?AI has identified unusual behaviors that may pose a security risk. An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding. What is unstable ownership?A new collaborator has begun publishing package versions. Package stability and security risk may be elevated. Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
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. |
a985b35
to
2f5ca29
Compare
f9a7864
to
5a9a062
Compare
<!-- 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** Fixes a formatting issue when displaying mailto links in the `SnapLinkWarning`. This was broken due to parsing the `mailto:` link in the same way as HTTPS and assumptions made about the output of that parsing. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30000?quickstart=1) ## **Related issues** Fixes: #29977 ## **Manual testing steps** See the attached ticket ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** See the attached ticket ### **After** ![image](https://github.com/user-attachments/assets/03dcf5d2-2d38-438f-b575-85c197f26961)
8953ccc
to
d864352
Compare
## **Description** Only remaining QA issue for feature: [[EXT] STX Banner Alert & STX x Default Migration](#28854) Update migration to treat null preference value as an existing enabled state, preventing unneeded banner display for v12.6.0-12.7.2 migrations. The update removes the `null` check in the migration's `transformState` function (near line 46 of `135.ts`) ```ts if ( currentOptInStatus === undefined || currentOptInStatus === null || // remove this line (currentOptInStatus === false && !hasExistingSmartTransactions(state)) ) { ``` And let the condition fall through to the else block. This will ensure that `smartTransactionsMigrationApplied: false` and ensure that we don't see a banner on Transaction Confirmation. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29968?quickstart=1) ## **Related issues** Fixes: #29970 **Description** Migration fails when the origin extension is version 12.7.x (tested 1 and 2) In this cases, the alert banner is displayed in the confirmation screen (e.g: send and swaps) when the parameter STX in settings was enabled in the older extension. **Expected behavior** The behaviour should be: extension 12.11.0 < with STX activated -> update to 12.11.0 and no banner is displayed in the confirmation screen ## **Manual testing steps for fix** 1. Migrate from any version 12.6.* to 12.7.* to 12.10.1 (or 12.11.0 depending) 2. Ensure that STX is ON in the old version (before migrating to the newer version) 3. After migration try to Swap or Send on Ethereum Mainnet & Sepolia and ensure there is no STX Banner Alert shown ## **Screenshots/Recordings** For users with STX ON before and after Migration: ### **Before** <img width="150" alt="after-fix" src="https://github.com/user-attachments/assets/fe33da33-7828-45e2-b7a1-8b7d60b12de5" /> ### **After** <img width="150" alt="after-fix" src="https://github.com/user-attachments/assets/fe33da33-7828-45e2-b7a1-8b7d60b12de5" /> ## **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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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** This PR addresses an issue where the "Insufficient funds" alert incorrectly displayed "ETH" as the native token, regardless of the actual network's native token #28867. This was observed when users attempted to initiate a transaction on networks with a different native token, such as Polygon, where "POL" should be displayed instead of "ETH". [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29828?quickstart=1) ## **Related issues** #28867 ## **Manual testing steps** 1. Select Polygon 2. Trigger a dapp tx with an account without funds (you can use these tests https://metamask.github.io/test-dapp/) 3. Click on the Alert 4. See POL as the token name ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://www.loom.com/share/8dd8001fc8d44da3b77e52a4877427f8 ## **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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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** This PR moves the notifications logic from `useProfileSyncing` to the Notifications context. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30004?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/IDENTITY-14 ## **Manual testing steps** 1. Enable notifications 2. Disable profile syncing 3. Verify that the notifications counter has been updated ## **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). - [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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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** This PR updates the outline style when the user navigates menu items using the TAB key. This ensures the user can clearly identify which item is currently focused. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29753?quickstart=1) ## **Related issues** #26728 ## **Manual testing steps** 1. Open the menu 2. Navigate through the items using the TAB key 3. Verify that the outline is displayed correctly on the focused item ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://www.loom.com/share/25a3748a1a8b49e6b3cf617ccf791240?sid=cbe7a8d6-46d9-431a-a0dd-682c6cf209a2 ## **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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
83a5c49
to
5275fb9
Compare
…up mitigation (#29745) <!-- 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** This PR replaces #24016 This PR does the following: Refactors `local-store.js` and `network-store.js` to `ExtensionStore.ts` and `ReadOnlyNetworkStore.ts`. These two classes are extensions of the new `BaseStore` class. The new `BaseStore` class: "is an abstract class designed to be extended by other classes that implement the abstract methods `set` and `get`. This class provides the foundation for different storage implementations, enabling them to adhere to a consistent interface for retrieving and setting application state." In future PRs, new classes that use the indexeddb api, and the localStorage api in the offscreen document, will be added that also extend the BaseStore class. The BaseStore class has a simple interface with just a `get` and `set` method. Accordingly, `ExtensionSotre` and `ReadOnlyNetworkStore` are significantly simplified compared to their predecessors. The functionality for managing data (e.g. handling error states, handling metadata, etc) that used to be in `local-store.js` and `network-store.js` is now in a new `PersistanceManager` class. The new `PersistanceManager` class: "The PersistanceManager class serves as a high-level manager for handling storage-related operations using a local storage system. It provides methods to read and write state, manage metadata, and handle errors or corruption in the underlying storage system." This is a step towards providing a fail safe for state corruption. The new classes will be utilized for this additional functionality. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29745?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** No functional changes should have occurred. Manual regression cases to test include: - make some changes such as a adding a network or changing settings. Close the browser. Re-open the browser and open metamask. The data should be unchanged. - Install an old version. Make some changes. Upgrade to the build generated from this branch. Verify that the state of the wallet, and its data, is as expected. ## **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. --------- Co-authored-by: Brad Decker <[email protected]> Co-authored-by: Mark Stacey <[email protected]>
## **Description** This PR ensures that the sign-in process happen only at the "pin extension" screen during onboarding. It was previously also called at the "creation successful" screen, but this is not needed since onboarding always ends with the "pin extension" screen. It also removes the `useCreateSession` hook, as this is not needed anymore since we directly call `performSignIn` from the background. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30003?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/IDENTITY-9 ## **Manual testing steps** 1. Do a fresh install 2. Open your network tab and filter with "login" 3. Do an onboarding and verify that this is called only once ## **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). - [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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
5275fb9
to
fa4a0eb
Compare
## **Description** This PR updates the style of the `ui/components/ui/tabs/tabs.component.js` component and removes some custom classes used to override the style in various parts of the site (particularly on the home page and the notifications page). This ensures a consistent style for the tabs. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29652?quickstart=1) ## **Related issues** Original request: #26190 ## **Manual testing steps** The tabs tested are those indicated in this issue: #28910. However, some of them seem to no longer be in use (for example, the “snap” tab in the permissions page should no longer exist, as it now has its own dedicated page). ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ### **After** <img width="453" alt="Screenshot 2025-01-13 at 09 49 49" src="https://github.com/user-attachments/assets/55aeaf12-fa5e-4c8c-8f4b-4ab9bfab29ff" /> <img width="366" alt="Screenshot 2025-01-12 at 23 28 37" src="https://github.com/user-attachments/assets/935de0dc-e0dd-4439-8ec0-754ded9a256b" /> <img width="358" alt="Screenshot 2025-01-12 at 23 28 23" src="https://github.com/user-attachments/assets/fa1cb8b8-97f4-483b-aedc-afdc91d9fb33" /> <img width="361" alt="Screenshot 2025-01-12 at 23 28 08" src="https://github.com/user-attachments/assets/8d9b2414-57f9-48ba-99ec-80e48efe1379" /> ## **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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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** Bump notifications controller from `0.16.0` to `0.17.0` [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29921?quickstart=1) ## **Related issues** Fixes: Audit resolution added here - #29914 ## **Manual testing steps** 1. Check `yarn audit` to see if `undici` audit issues are resolved. 2. Notification devs - check push notifications are still working as expected. ## **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.
## **Description** This PR introduces significant improvements to the handling of alt text for NFT images within the application. The main changes include: **Removal of Unnecessary Conditions for Alt Text** In the `NftDetails`, `NftFullImage`, and `NFTSendHeading` components, the alt text for NFT images has been simplified by removing conditions that returned an empty string when the image was missing. Now, the alt text is always generated using getNftImageAlt. **Introduction of a Truncation Function for Alt Text** The `nftTruncateAltText` function has been added to ensure that the alt text does not exceed a predefined maximum length, improving accessibility and usability. **Updates to Tests** - New tests have been added to cover use cases for the `nftTruncateAltText` function - Tests for `getNftImageAlt` have been updated to handle cases where name, tokenId, or description are not provided **Updates to Component Stories** - The `NftItem` stories have been updated to use `getNftImageAlt` - A new story `NoImageStory` has been added to test behavior when the image is not present [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29744?quickstart=1) ## **Related issues** Fixes: #26461 ## **Manual testing steps** Follow the steps outlined in the issue #26461 ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ### **After** <img width="671" alt="Screenshot 2025-01-16 at 10 41 42" src="https://github.com/user-attachments/assets/3dc6f031-6def-4ce9-8bd6-e27017291c87" /> ## **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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
fa4a0eb
to
387266b
Compare
<!-- 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** Users are experiencing issues with receiving significantly lower amounts of destination tokens than expected during swaps. This is due to excessive price differentials between the estimated swap amount and the actual return. Currently, the logic for triggering a low return warning differs between swaps and bridges, leading to inconsistencies and user confusion. This PR brings swap to parity with bridge by adding a warning when a swap results in a return below 80% of the value of the source tokens. <!-- 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/29918?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to swaps 2. Select tokens and input amount to force warning (eg. 0.01 ETH to ENA) 3. See warning ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ![Screenshot 2025-01-27 at 19 55 48](https://github.com/user-attachments/assets/828a13ac-10bc-4624-b538-ca1e05e36fff) <!-- [screenshots/recordings] --> ### **After** ![Screenshot 2025-01-27 at 19 55 18](https://github.com/user-attachments/assets/5109052f-25c0-4e32-bc4a-4ab5a7e9d526) <!-- [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). - [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.
58491f8
to
b2ec9a8
Compare
…29988) ## **Description** Fix bug when requested accounts/chainIds do not match wallet state [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29988?quickstart=1) ## **Manual testing steps** See videos below: ``` await window.ethereum.request({ "method": "wallet_requestPermissions", "params": [ { "eth_accounts": { "caveats": [ { "type": "restrictReturnedAccounts", "value": [] } ] }, "endowment:permitted-chains": { "caveats": [ { "type": "restrictNetworkSwitching", "value": ['0xbf04'] // any chainId not in the wallet } ] } } ], }); ``` ``` await window.ethereum.request({ "method": "wallet_requestPermissions", "params": [ { "eth_accounts": { "caveats": [ { "type": "restrictReturnedAccounts", "value": ["0x549f7D54F0a7ef67707c55dc51123586a2c6654e"] // any address not in the wallet } ] }, "endowment:permitted-chains": { "caveats": [ { "type": "restrictNetworkSwitching", "value": [] } ] } } ], }); ``` ## **Screenshots/Recordings** ### **Before** https://github.com/user-attachments/assets/21f40a75-0513-4105-8f8a-f87faf2a583c https://github.com/user-attachments/assets/d8e71869-5181-4751-a274-8e39cc8ec567 ### **After** https://github.com/user-attachments/assets/4f33ca41-657b-4902-b998-70c8c222484a https://github.com/user-attachments/assets/d8059e25-2772-4aef-8d26-e6b6325788ac https://github.com/user-attachments/assets/a67517c7-498f-485a-a547-59d330d9f0a8 ## **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. --------- Co-authored-by: ffmcgee <[email protected]> Co-authored-by: ffmcgee <[email protected]> Co-authored-by: ffmcgee <[email protected]>
9e96054
to
db666f8
Compare
<!-- 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 hides the network picker's back button when there's no selected network. Currently this causes the dest network picker to navigate to the src asset picker [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29711?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1852 ## **Manual testing steps** 1. Load bridge page 2. Open dest asset picker 3. Verify that back button is not visible ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/4bbde8e4-bdd5-4fa2-aeb5-248d433e25a2 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/731280a5-3faf-401c-9236-8e932a9f347e ## **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.
db666f8
to
312c1ec
Compare
Report too large to display inline |
No description provided.