From 27f3c21f4887fe0528acd9b7bf1b47de22d86cc7 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 5 Dec 2024 21:00:48 +0100 Subject: [PATCH 1/2] chore: bump `@metamask/account-watcher` to `^4.2.2` (#28915) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This new version now uses `devDependencies` rather than `dependencies`, which avoid pulling unnecessary deps into the main tree (check the `yarn.lock`). [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28915?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** N/A ## **Screenshots/Recordings** ### **Before** ### **After** ## **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. --- package.json | 2 +- yarn.lock | 40 ++++++++-------------------------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index ee7f4828808c..70bf454023eb 100644 --- a/package.json +++ b/package.json @@ -282,7 +282,7 @@ "@metamask-institutional/transaction-update": "^0.2.6", "@metamask-institutional/types": "^1.2.0", "@metamask/abi-utils": "^2.0.2", - "@metamask/account-watcher": "^4.1.1", + "@metamask/account-watcher": "^4.1.2", "@metamask/accounts-controller": "^20.0.0", "@metamask/address-book-controller": "^6.0.0", "@metamask/announcement-controller": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index f751769212e7..13341ff90db7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2365,7 +2365,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^5.1.0, @ethereumjs/tx@npm:^5.2.1, @ethereumjs/tx@npm:^5.3.0": +"@ethereumjs/tx@npm:^5.2.1, @ethereumjs/tx@npm:^5.3.0": version: 5.4.0 resolution: "@ethereumjs/tx@npm:5.4.0" dependencies: @@ -2388,7 +2388,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/util@npm:^9.0.1, @ethereumjs/util@npm:^9.0.2, @ethereumjs/util@npm:^9.0.3, @ethereumjs/util@npm:^9.1.0": +"@ethereumjs/util@npm:^9.0.2, @ethereumjs/util@npm:^9.0.3, @ethereumjs/util@npm:^9.1.0": version: 9.1.0 resolution: "@ethereumjs/util@npm:9.1.0" dependencies: @@ -4835,18 +4835,10 @@ __metadata: languageName: node linkType: hard -"@metamask/account-watcher@npm:^4.1.1": - version: 4.1.1 - resolution: "@metamask/account-watcher@npm:4.1.1" - dependencies: - "@ethereumjs/tx": "npm:^5.1.0" - "@ethereumjs/util": "npm:^9.0.1" - "@metamask/keyring-api": "npm:^8.1.3" - "@metamask/snaps-sdk": "npm:^6.2.1" - "@metamask/utils": "npm:^8.3.0" - ethers: "npm:^5.7.2" - uuid: "npm:^9.0.0" - checksum: 10/a1b53cdcd3a5844c1edd2e91bf6d2e5a1f3914f795c928f9611c56bc4133c8338e4ae491cb2fda7273e59830a1d613ce17997a0639bb82ec5c71c2f0b260d88e +"@metamask/account-watcher@npm:^4.1.2": + version: 4.1.2 + resolution: "@metamask/account-watcher@npm:4.1.2" + checksum: 10/366e69b6d8fd0f68eb77cfe4c9c5dd1fb74107978a6609f7c0dcd0a1f21a2bf44fae6442165d993f700ef75120808c91e3ae84baeb78b7292458586311cb8c2f languageName: node linkType: hard @@ -5613,22 +5605,6 @@ __metadata: languageName: node linkType: hard -"@metamask/keyring-api@npm:^8.1.3": - version: 8.1.3 - resolution: "@metamask/keyring-api@npm:8.1.3" - dependencies: - "@metamask/snaps-sdk": "npm:^6.5.1" - "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^9.2.1" - "@types/uuid": "npm:^9.0.8" - bech32: "npm:^2.0.0" - uuid: "npm:^9.0.1" - peerDependencies: - "@metamask/providers": ^17.2.0 - checksum: 10/9857b6286760d22b1b7102ea8bdf03ebf56c71e9f0adee19a2230def6b7a9230561c1a3bfcb308735b79ab9a5afa9afd07a1617c1d165f63d193cd6a6b6e7a15 - languageName: node - linkType: hard - "@metamask/keyring-api@npm:^9.0.0": version: 9.0.0 resolution: "@metamask/keyring-api@npm:9.0.0" @@ -18776,7 +18752,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:5.7.2, ethers@npm:^5.7.0, ethers@npm:^5.7.2": +"ethers@npm:5.7.2, ethers@npm:^5.7.0": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -26407,7 +26383,7 @@ __metadata: "@metamask-institutional/transaction-update": "npm:^0.2.6" "@metamask-institutional/types": "npm:^1.2.0" "@metamask/abi-utils": "npm:^2.0.2" - "@metamask/account-watcher": "npm:^4.1.1" + "@metamask/account-watcher": "npm:^4.1.2" "@metamask/accounts-controller": "npm:^20.0.0" "@metamask/address-book-controller": "npm:^6.0.0" "@metamask/announcement-controller": "npm:^7.0.0" From 456e63f4dc26f0603ff0d4fb3a11de254b642622 Mon Sep 17 00:00:00 2001 From: Priya Date: Fri, 6 Dec 2024 04:06:59 +0800 Subject: [PATCH 2/2] test: fix flaky erc20 send token e2e (#28775) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The issue is that sometimes when clicking on the watchAssets button from the test dapp the metamask dialog does not open. The test dapp button is present and enabled but for some reason clicking on it does nothing. However if you wait for a second and then click this seems to solve the issue. Also tried to wait until the page is loaded, element is present, visible and enabled, however, the flakiness persists. Hence added a hardcoded wait. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28775?quickstart=1) ## **Related issues** Fixes: [#28700](https://github.com/MetaMask/metamask-extension/issues/28700) ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/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. ## **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: Harika <153644847+hjetpoluru@users.noreply.github.com> --- .../transactions/erc20-token-send-redesign.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e/tests/confirmations/transactions/erc20-token-send-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/erc20-token-send-redesign.spec.ts index 036a8287882c..317d97abef6e 100644 --- a/test/e2e/tests/confirmations/transactions/erc20-token-send-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/erc20-token-send-redesign.spec.ts @@ -127,6 +127,7 @@ async function createWalletInitiatedTransactionAndAssertDetails( await testDapp.openTestDappPage({ contractAddress, url: DAPP_URL }); + await driver.delay(1000); await testDapp.clickERC20WatchAssetButton(); await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); @@ -172,6 +173,7 @@ async function createDAppInitiatedTransactionAndAssertDetails( await testDapp.openTestDappPage({ contractAddress, url: DAPP_URL }); + await driver.delay(1000); await testDapp.clickERC20WatchAssetButton(); await driver.delay(veryLargeDelayMs);