From 7e88180085c44740eb477998bfb9da124ca9f90a Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 26 Sep 2024 18:50:19 +0000 Subject: [PATCH 1/6] Version v12.3.1 --- CHANGELOG.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 199b83700dde..c3d631ae1863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.3.1] + ## [12.3.0] ### Added - Added the ability to name accounts during the snap account creation flow ([#25191](https://github.com/MetaMask/metamask-extension/pull/25191)) @@ -5106,7 +5108,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.3.0...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.3.1...HEAD +[12.3.1]: https://github.com/MetaMask/metamask-extension/compare/v12.3.0...v12.3.1 [12.3.0]: https://github.com/MetaMask/metamask-extension/compare/v12.2.4...v12.3.0 [12.2.4]: https://github.com/MetaMask/metamask-extension/compare/v12.2.3...v12.2.4 [12.2.3]: https://github.com/MetaMask/metamask-extension/compare/v12.2.2...v12.2.3 diff --git a/package.json b/package.json index 939c5ce3ff10..51894461c76e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.3.0", + "version": "12.3.1", "private": true, "repository": { "type": "git", From 5f93766df41b787d2f0d391a8ba0fa79c6bda52b Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 26 Sep 2024 17:36:28 -0230 Subject: [PATCH 2/6] fix: fix changes that were introduced in (#26807) but broken by 3e1094af (#27435) This PR correctly applies the changes from #26807 and #26924 to master. These were broken, probably by careless human error, in 3e1094af --------- Co-authored-by: Matteo Scurati --- app/scripts/metamask-controller.js | 2 -- test/e2e/tests/metrics/nft-detection-metrics.spec.js | 1 - test/e2e/tests/metrics/token-detection-metrics.spec.js | 1 - test/e2e/tests/metrics/wallet-created.spec.js | 1 - ui/components/multichain/global-menu/global-menu.js | 1 + .../notification-detail-button/notification-detail-button.tsx | 2 +- .../creation-successful/creation-successful.js | 4 ---- 7 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 141fab5aebc8..ebffc180f95f 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1488,8 +1488,6 @@ export default class MetamaskController extends EventEmitter { notification_id: notification.id, notification_type: notification.type, chain_id: notification?.chain_id, - notification_is_read: notification.isRead, - click_type: 'push_notification', }, }); }, diff --git a/test/e2e/tests/metrics/nft-detection-metrics.spec.js b/test/e2e/tests/metrics/nft-detection-metrics.spec.js index 5b635a725e20..3c77fdb66731 100644 --- a/test/e2e/tests/metrics/nft-detection-metrics.spec.js +++ b/test/e2e/tests/metrics/nft-detection-metrics.spec.js @@ -102,7 +102,6 @@ describe('Nft detection event @no-mmi', function () { chain_id: '0x539', environment_type: 'fullscreen', is_profile_syncing_enabled: null, - is_signed_in: false, }); assert.deepStrictEqual(events[2].properties, { nft_autodetection_enabled: true, diff --git a/test/e2e/tests/metrics/token-detection-metrics.spec.js b/test/e2e/tests/metrics/token-detection-metrics.spec.js index 5115343f5a39..669aff0a9290 100644 --- a/test/e2e/tests/metrics/token-detection-metrics.spec.js +++ b/test/e2e/tests/metrics/token-detection-metrics.spec.js @@ -99,7 +99,6 @@ describe('Token detection event @no-mmi', function () { chain_id: '0x539', environment_type: 'fullscreen', is_profile_syncing_enabled: null, - is_signed_in: false, }); assert.deepStrictEqual(events[2].properties, { token_detection_enabled: true, diff --git a/test/e2e/tests/metrics/wallet-created.spec.js b/test/e2e/tests/metrics/wallet-created.spec.js index bc07cfdeea75..890ac9342a8a 100644 --- a/test/e2e/tests/metrics/wallet-created.spec.js +++ b/test/e2e/tests/metrics/wallet-created.spec.js @@ -88,7 +88,6 @@ describe('Wallet Created Events @no-mmi', function () { chain_id: '0x539', environment_type: 'fullscreen', is_profile_syncing_enabled: null, - is_signed_in: false, }); }, ); diff --git a/ui/components/multichain/global-menu/global-menu.js b/ui/components/multichain/global-menu/global-menu.js index 09fdce45f974..ab33de326ee7 100644 --- a/ui/components/multichain/global-menu/global-menu.js +++ b/ui/components/multichain/global-menu/global-menu.js @@ -148,6 +148,7 @@ export const GlobalMenu = ({ closeMenu, anchorElement, isOpen }) => { if (shouldShowEnableModal) { trackEvent({ + category: MetaMetricsEventCategory.NotificationsActivationFlow, event: MetaMetricsEventName.NotificationsActivated, properties: { action_type: 'started', diff --git a/ui/components/multichain/notification-detail-button/notification-detail-button.tsx b/ui/components/multichain/notification-detail-button/notification-detail-button.tsx index 82a79c4fcf91..b4c243ef9b7d 100644 --- a/ui/components/multichain/notification-detail-button/notification-detail-button.tsx +++ b/ui/components/multichain/notification-detail-button/notification-detail-button.tsx @@ -38,7 +38,7 @@ export const NotificationDetailButton = ({ const onClick = () => { trackEvent({ category: MetaMetricsEventCategory.NotificationInteraction, - event: MetaMetricsEventName.NotificationClicked, + event: MetaMetricsEventName.NotificationDetailClicked, properties: { notification_id: notification.id, notification_type: notification.type, diff --git a/ui/pages/onboarding-flow/creation-successful/creation-successful.js b/ui/pages/onboarding-flow/creation-successful/creation-successful.js index 79321c7c5991..fab463e5b685 100644 --- a/ui/pages/onboarding-flow/creation-successful/creation-successful.js +++ b/ui/pages/onboarding-flow/creation-successful/creation-successful.js @@ -25,7 +25,6 @@ import { import { MetaMetricsContext } from '../../../contexts/metametrics'; import { useCreateSession } from '../../../hooks/metamask-notifications/useCreateSession'; import { selectIsProfileSyncingEnabled } from '../../../selectors/metamask-notifications/profile-syncing'; -import { selectIsSignedIn } from '../../../selectors/metamask-notifications/authentication'; export default function CreationSuccessful() { const history = useHistory(); @@ -37,8 +36,6 @@ export default function CreationSuccessful() { const isProfileSyncingEnabled = useSelector(selectIsProfileSyncingEnabled); - const isSignedIn = useSelector(selectIsSignedIn); - return (
@@ -118,7 +115,6 @@ export default function CreationSuccessful() { event: MetaMetricsEventName.OnboardingWalletCreationComplete, properties: { method: firstTimeFlowType, - is_signed_in: isSignedIn, is_profile_syncing_enabled: isProfileSyncingEnabled, }, }); From 190572fbe6943520e5e7bcae498ab7080e4d3146 Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Fri, 27 Sep 2024 12:41:01 -0700 Subject: [PATCH 3/6] fix: duplicate network validation in 12.3 (#27463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Fixes issue [27456](https://github.com/MetaMask/metamask-extension/issues/27456) in 12.3. If you try to add a new network with the same RPC URL and chain id as an existing network, the link presented in the error message does not work and throws an error: https://github.com/user-attachments/assets/ebcade54-e49e-4a04-9ed6-396f2458f77a This link in the error message was intended for the network redesign and should stay behind the feature flag. Duplicate chain IDs are allowed in this version of network managment. So this PR makes it back into a warning like it would have been in 12.2: Screenshot 2024-09-27 at 12 02 49 PM There's nothing to fix in develop since it is already on the new network controller / UI [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27463?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/metamask-extension/issues/27456 ## **Manual testing steps** 1. Try to add a new network with the same RPC URL and chain id as an existing network. ## **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. --- ui/pages/settings/networks-tab/networks-form/networks-form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/pages/settings/networks-tab/networks-form/networks-form.js b/ui/pages/settings/networks-tab/networks-form/networks-form.js index 4998e7df1a43..247936a76621 100644 --- a/ui/pages/settings/networks-tab/networks-form/networks-form.js +++ b/ui/pages/settings/networks-tab/networks-form/networks-form.js @@ -508,6 +508,7 @@ const NetworksForm = ({ } if ( + networkMenuRedesign && addNewNetwork && networksList.some( (network) => From 31d1f143b84f45b7bd3cd9ef22cc8300a277839a Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 27 Sep 2024 17:14:37 -0230 Subject: [PATCH 4/6] fix: Handle null return value from getMethodData to prevent destructuring error (#27457) (#27462) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The original code assumes that getMethodData will always return an object with a name property. However, in certain instances, getMethodData can return null. When this happens, destructuring the name property from null causes a runtime error. To address this issue, the code has been updated to use optional chaining. This ensures that if getMethodData returns null, the destructuring will not occur, and contractMethodName will be set to undefined instead of causing an error. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27457?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/metamask-extension/issues/27436 ## **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: Pedro Figueiredo --- app/scripts/lib/transaction/metrics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/transaction/metrics.ts b/app/scripts/lib/transaction/metrics.ts index 6ce19ec65303..39bf23b7e74c 100644 --- a/app/scripts/lib/transaction/metrics.ts +++ b/app/scripts/lib/transaction/metrics.ts @@ -810,10 +810,10 @@ async function buildEventFragmentProperties({ let contractMethodName; if (transactionMeta.txParams.data) { - const { name } = await transactionMetricsRequest.getMethodData( + const methodData = await transactionMetricsRequest.getMethodData( transactionMeta.txParams.data, ); - contractMethodName = name; + contractMethodName = methodData?.name; } // TODO: Replace `any` with type From 98a6968932d267b7b837fea80f8f0a90fb02e0e4 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 30 Sep 2024 10:44:35 -0230 Subject: [PATCH 5/6] chore: Update changelog for v12.3.1 (#27465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Update changelog for v12.3.1 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27465?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **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. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d631ae1863..d4825ab021bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [12.3.1] +### Fixed +- Fix duplicate network validation ([#27463](https://github.com/MetaMask/metamask-extension/pull/27463)) +- Fix notification metrics ([#26807](https://github.com/MetaMask/metamask-extension/pull/26807)) +- Fix transaction metrics ([#27457](https://github.com/MetaMask/metamask-extension/pull/27457)) ## [12.3.0] ### Added From 2ede67e2296f42224fab2c97784dfe83f2c47329 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 30 Sep 2024 16:56:16 -0230 Subject: [PATCH 6/6] chore: Fix link in change entry (#27508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The "Fix notification metrics" change entry linked a PR where some of these metrics were originally introduced, but it should have linked the PR where they were fixed. The link has been updated. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27508?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **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. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4825ab021bc..9dd79055e0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [12.3.1] ### Fixed - Fix duplicate network validation ([#27463](https://github.com/MetaMask/metamask-extension/pull/27463)) -- Fix notification metrics ([#26807](https://github.com/MetaMask/metamask-extension/pull/26807)) +- Fix notification metrics ([#27435](https://github.com/MetaMask/metamask-extension/pull/27435)) - Fix transaction metrics ([#27457](https://github.com/MetaMask/metamask-extension/pull/27457)) ## [12.3.0]