From c13bfeeb00c0d46c01385c015b83cd74391d5b81 Mon Sep 17 00:00:00 2001 From: Gauthier Petetin Date: Mon, 9 Nov 2026 14:04:13 +0100 Subject: [PATCH 1/2] chore: point marketing page URLs at metamask.com Update product marketing destinations such as Transaction Shield, Money, update, uninstall, restoring, news, and perps so they use metamask.com paths that already redirect from metamask.io. Co-authored-by: Cursor --- app/manifest/v2/_base.json | 2 +- app/manifest/v3/_base.json | 2 +- .../controllers/analytics/analytics.test.ts | 4 +-- .../controllers/analytics/analytics.ts | 2 +- .../critical-error-tab-handoff.test.ts | 28 +++++++++---------- .../critical-error-tab-handoff.ts | 2 +- .../lib/open-update-tab-and-reload.test.ts | 2 +- app/scripts/lib/open-update-tab-and-reload.ts | 2 +- .../critical-error-repair-session.ts | 2 +- .../bridge-utils/security-alerts-api.util.ts | 2 +- .../tests/update-modal/update-modal.spec.ts | 2 +- ui/__mocks__/perps/perps-controller/index.ts | 2 +- .../constants.ts | 2 +- .../app/modals/pna25-modal/constants.ts | 2 +- ui/helpers/constants/common.ts | 2 +- .../ShieldCoverageAlertMessage.test.tsx | 2 +- .../ShieldCoverageAlertMessage.tsx | 2 +- ui/pages/money/constants/urls.ts | 4 +-- ui/pages/money/money-home-page.test.tsx | 10 +++---- 19 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/manifest/v2/_base.json b/app/manifest/v2/_base.json index ddce934cc083..3d478bdaa812 100644 --- a/app/manifest/v2/_base.json +++ b/app/manifest/v2/_base.json @@ -1,5 +1,5 @@ { - "author": "https://metamask.io", + "author": "https://metamask.com", "background": { "page": "background.html", "persistent": true diff --git a/app/manifest/v3/_base.json b/app/manifest/v3/_base.json index 45ad62f2d07a..5f439f1fb2e5 100644 --- a/app/manifest/v3/_base.json +++ b/app/manifest/v3/_base.json @@ -12,7 +12,7 @@ "default_title": "MetaMask", "default_popup": "popup-init.html" }, - "author": "https://metamask.io", + "author": "https://metamask.com", "background": { "service_worker": "service-worker.ts" }, diff --git a/app/scripts/controllers/analytics/analytics.test.ts b/app/scripts/controllers/analytics/analytics.test.ts index a7e1d6bc3d7d..447632d2ea8a 100644 --- a/app/scripts/controllers/analytics/analytics.test.ts +++ b/app/scripts/controllers/analytics/analytics.test.ts @@ -484,7 +484,7 @@ describe('analytics', () => { expect(setUninstallURL).toHaveBeenCalledTimes(1); expect(setUninstallURL).toHaveBeenCalledWith( - `https://metamask.io/uninstalled?${new URLSearchParams({ + `https://metamask.com/uninstalled?${new URLSearchParams({ av: testVersion, mmi: encodedAnalyticsId, env: ENVIRONMENT.PRODUCTION, @@ -501,7 +501,7 @@ describe('analytics', () => { expect(setUninstallURL).toHaveBeenCalledTimes(1); expect(setUninstallURL).toHaveBeenCalledWith( - `https://metamask.io/uninstalled?${new URLSearchParams({ + `https://metamask.com/uninstalled?${new URLSearchParams({ av: testVersion, }).toString()}`, ); diff --git a/app/scripts/controllers/analytics/analytics.ts b/app/scripts/controllers/analytics/analytics.ts index bc3e81028153..008e327da8ac 100644 --- a/app/scripts/controllers/analytics/analytics.ts +++ b/app/scripts/controllers/analytics/analytics.ts @@ -35,7 +35,7 @@ import { trackSegmentEventWhileOptedOut } from '../../lib/segment/custom-segment import { getPlatform } from '../../lib/util'; import { ANONYMOUS_EVENT_PROPERTY } from './platform-adapter'; -const EXTENSION_UNINSTALL_URL = 'https://metamask.io/uninstalled'; +const EXTENSION_UNINSTALL_URL = 'https://metamask.com/uninstalled'; type SegmentTrackPayload = Omit< SegmentEventPayload, diff --git a/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts b/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts index b8e14998f226..c98ea50871a0 100644 --- a/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts +++ b/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts @@ -65,7 +65,7 @@ describe('critical-error-repair session', () => { CriticalErrorRepairAction.Reset, ]) { it(`returns payload with stored ${repairAction} repairAction when repair session data is valid`, async () => { - const tabUrl = 'https://metamask.io/restoring#abc'; + const tabUrl = 'https://metamask.com/restoring#abc'; (browser.storage.local.get as jest.Mock).mockResolvedValueOnce({ [CRITICAL_ERROR_REPAIR_KEY]: { repairAction, @@ -85,7 +85,7 @@ describe('critical-error-repair session', () => { } it('defaults to recover when repairAction is missing', async () => { - const tabUrl = 'https://metamask.io/restoring#abc'; + const tabUrl = 'https://metamask.com/restoring#abc'; (browser.storage.local.get as jest.Mock).mockResolvedValueOnce({ [CRITICAL_ERROR_REPAIR_KEY]: { tabUrl, tabId: 42 }, }); @@ -100,7 +100,7 @@ describe('critical-error-repair session', () => { }); it('returns undefined tabId when tabId is not a number', async () => { - const tabUrl = 'https://metamask.io/restoring#abc'; + const tabUrl = 'https://metamask.com/restoring#abc'; (browser.storage.local.get as jest.Mock).mockResolvedValueOnce({ [CRITICAL_ERROR_REPAIR_KEY]: { tabUrl }, }); @@ -235,7 +235,7 @@ describe('handoffRestoringTabToExtension', () => { await handoffRestoringTabToExtension(platform, { tabId: undefined, - tabUrl: 'https://metamask.io/restoring#1', + tabUrl: 'https://metamask.com/restoring#1', }); expect(browser.tabs.get).not.toHaveBeenCalled(); @@ -246,7 +246,7 @@ describe('handoffRestoringTabToExtension', () => { }); it('updates tab when URL still matches', async () => { - const tabUrl = 'https://metamask.io/restoring#frag'; + const tabUrl = 'https://metamask.com/restoring#frag'; (browser.tabs.get as jest.Mock).mockResolvedValueOnce({ id: 7, url: tabUrl, @@ -262,11 +262,11 @@ describe('handoffRestoringTabToExtension', () => { expect(browser.tabs.create).not.toHaveBeenCalled(); }); - it('updates tab when metamask.io redirected to locale-prefixed path', async () => { - const tabUrl = 'https://metamask.io/restoring#frag'; + it('updates tab when metamask.com redirected to locale-prefixed path', async () => { + const tabUrl = 'https://metamask.com/restoring#frag'; (browser.tabs.get as jest.Mock).mockResolvedValueOnce({ id: 7, - url: 'https://metamask.io/en-GB/restoring#frag', + url: 'https://metamask.com/en-GB/restoring#frag', }); (browser.tabs.update as jest.Mock).mockResolvedValueOnce({}); @@ -289,7 +289,7 @@ describe('handoffRestoringTabToExtension', () => { await handoffRestoringTabToExtension(platform, { tabId: 7, - tabUrl: 'https://metamask.io/restoring#frag', + tabUrl: 'https://metamask.com/restoring#frag', }); expect(browser.tabs.update).not.toHaveBeenCalled(); @@ -302,14 +302,14 @@ describe('handoffRestoringTabToExtension', () => { it('opens extension UI in a new tab when hash fragment differs', async () => { (browser.tabs.get as jest.Mock).mockResolvedValueOnce({ id: 7, - url: 'https://metamask.io/restoring#different', + url: 'https://metamask.com/restoring#different', }); (browser.tabs.create as jest.Mock).mockResolvedValueOnce({ id: 2 }); await handoffRestoringTabToExtension(platform, { tabId: 7, - tabUrl: 'https://metamask.io/restoring#frag', + tabUrl: 'https://metamask.com/restoring#frag', }); expect(browser.tabs.update).not.toHaveBeenCalled(); @@ -326,7 +326,7 @@ describe('handoffRestoringTabToExtension', () => { await expect( handoffRestoringTabToExtension(platform, { tabId: 99, - tabUrl: 'https://metamask.io/restoring#frag', + tabUrl: 'https://metamask.com/restoring#frag', }), ).resolves.toBeUndefined(); @@ -337,7 +337,7 @@ describe('handoffRestoringTabToExtension', () => { }); it('opens extension UI in a new tab when tabs.update fails', async () => { - const tabUrl = 'https://metamask.io/restoring#frag'; + const tabUrl = 'https://metamask.com/restoring#frag'; (browser.tabs.get as jest.Mock).mockResolvedValueOnce({ id: 7, url: tabUrl, @@ -362,7 +362,7 @@ describe('handoffRestoringTabToExtension', () => { await handoffRestoringTabToExtension(platform, { tabId: 7, - tabUrl: 'https://metamask.io/restoring#frag', + tabUrl: 'https://metamask.com/restoring#frag', }); expect(browser.tabs.update).not.toHaveBeenCalled(); diff --git a/app/scripts/lib/critical-error/critical-error-tab-handoff.ts b/app/scripts/lib/critical-error/critical-error-tab-handoff.ts index cecea4e016a5..3f02dc4d14ca 100644 --- a/app/scripts/lib/critical-error/critical-error-tab-handoff.ts +++ b/app/scripts/lib/critical-error/critical-error-tab-handoff.ts @@ -172,7 +172,7 @@ async function tryHandoffViaRestoringTab( } const actual = new URL(tab.url); - // metamask.io may redirect to a locale-prefixed path (e.g. /en-GB/restoring) + // metamask.com may redirect to a locale-prefixed path (e.g. /en-GB/restoring) if ( actual.origin !== expected.origin || !actual.pathname.endsWith('/restoring') || diff --git a/app/scripts/lib/open-update-tab-and-reload.test.ts b/app/scripts/lib/open-update-tab-and-reload.test.ts index d6e8994baf72..79c70f5ccb38 100644 --- a/app/scripts/lib/open-update-tab-and-reload.test.ts +++ b/app/scripts/lib/open-update-tab-and-reload.test.ts @@ -18,7 +18,7 @@ describe('openUpdateTabAndReload', () => { await openUpdateTabAndReload(mockRequestSafeReload); expect(browser.tabs.create).toHaveBeenCalledWith({ - url: 'https://metamask.io/updating', + url: 'https://metamask.com/updating', active: true, }); expect(mockRequestSafeReload).toHaveBeenCalled(); diff --git a/app/scripts/lib/open-update-tab-and-reload.ts b/app/scripts/lib/open-update-tab-and-reload.ts index 2bce0747843a..f0b035ec0cae 100644 --- a/app/scripts/lib/open-update-tab-and-reload.ts +++ b/app/scripts/lib/open-update-tab-and-reload.ts @@ -15,7 +15,7 @@ export async function openUpdateTabAndReload( ) { try { await browser.tabs.create({ - url: 'https://metamask.io/updating', + url: 'https://metamask.com/updating', active: true, }); } catch (error) { diff --git a/shared/constants/critical-error-repair-session.ts b/shared/constants/critical-error-repair-session.ts index 997026511332..da8a84262c92 100644 --- a/shared/constants/critical-error-repair-session.ts +++ b/shared/constants/critical-error-repair-session.ts @@ -1,3 +1,3 @@ export const CRITICAL_ERROR_REPAIR_KEY = 'criticalErrorRepair'; -export const METAMASK_RESTORING_PAGE_URL = 'https://metamask.io/restoring'; +export const METAMASK_RESTORING_PAGE_URL = 'https://metamask.com/restoring'; diff --git a/shared/lib/bridge-utils/security-alerts-api.util.ts b/shared/lib/bridge-utils/security-alerts-api.util.ts index bd97dab35ccd..d1159f8a508e 100644 --- a/shared/lib/bridge-utils/security-alerts-api.util.ts +++ b/shared/lib/bridge-utils/security-alerts-api.util.ts @@ -19,7 +19,7 @@ import { import { MultichainNetworks } from '../../constants/multichain/networks'; import { decimalToPrefixedHex } from '../conversion.utils'; -const DOMAIN = 'https://metamask.io'; +const DOMAIN = 'https://metamask.com'; export function isSecurityAlertsAPIEnabled() { const isEnabled = process.env.SECURITY_ALERTS_API_ENABLED; diff --git a/test/e2e/tests/update-modal/update-modal.spec.ts b/test/e2e/tests/update-modal/update-modal.spec.ts index 91a37a0b64e0..5b1e27777ba5 100644 --- a/test/e2e/tests/update-modal/update-modal.spec.ts +++ b/test/e2e/tests/update-modal/update-modal.spec.ts @@ -116,7 +116,7 @@ describe('Update modal', function (this: Suite) { // we need to mock the updating page that is opened when the user confirms the update testSpecificMock: async (server: Mockttp) => { await server - .forGet('https://metamask.io/updating') + .forGet('https://metamask.com/updating') .thenCallback(() => ({ statusCode: 200, body: 'MetaMask Updating', diff --git a/ui/__mocks__/perps/perps-controller/index.ts b/ui/__mocks__/perps/perps-controller/index.ts index cadfb35cfdd1..3d31cecabbc7 100644 --- a/ui/__mocks__/perps/perps-controller/index.ts +++ b/ui/__mocks__/perps/perps-controller/index.ts @@ -488,7 +488,7 @@ export type SortButtonPreset = * External resources and content for Perps education */ export const LEARN_MORE_CONFIG = { - ExternalUrl: 'https://metamask.io/perps', + ExternalUrl: 'https://metamask.com/perps', TitleKey: 'perps.tutorial.card.title', DescriptionKey: 'perps.learn_more.description', CtaKey: 'perps.learn_more.cta', diff --git a/ui/components/app/basic-functionality-migration-modal/constants.ts b/ui/components/app/basic-functionality-migration-modal/constants.ts index fbd0f9900b7c..b9c31827c773 100644 --- a/ui/components/app/basic-functionality-migration-modal/constants.ts +++ b/ui/components/app/basic-functionality-migration-modal/constants.ts @@ -1,5 +1,5 @@ export const BASIC_FUNCTIONALITY_MIGRATION_BLOG_POST_LINK = - 'https://metamask.io/news/basic-functionality-profile-setting'; + 'https://metamask.com/news/basic-functionality-profile-setting'; export const BASIC_FUNCTIONALITY_MIGRATION_PRIVACY_NOTICE_LINK = 'https://metamask.com/privacy-notice'; diff --git a/ui/components/app/modals/pna25-modal/constants.ts b/ui/components/app/modals/pna25-modal/constants.ts index 9b296ef47af7..0feb4cc6742b 100644 --- a/ui/components/app/modals/pna25-modal/constants.ts +++ b/ui/components/app/modals/pna25-modal/constants.ts @@ -1,5 +1,5 @@ export const PNA25_BLOG_POST_LINK = - 'https://metamask.io/news/updating-metamask-analytics'; + 'https://metamask.com/news/updating-metamask-analytics'; export enum Pna25NoticeAction { Viewed = 'viewed', diff --git a/ui/helpers/constants/common.ts b/ui/helpers/constants/common.ts index 901e730333dc..9e010d3bdbd2 100644 --- a/ui/helpers/constants/common.ts +++ b/ui/helpers/constants/common.ts @@ -7,7 +7,7 @@ const _contractAddressLink = ZENDESK_URLS.CONTRACT_ADDRESS_WARNING; export const TRANSACTION_SHIELD_SUPPORT_LINK = ZENDESK_URLS.TRANSACTION_SHIELD; -export const TRANSACTION_SHIELD_LINK = 'https://metamask.io/transaction-shield'; +export const TRANSACTION_SHIELD_LINK = 'https://metamask.com/transaction-shield'; export const FIND_TRANSACTION_HASH_LINK = ZENDESK_URLS.FIND_TRANSACTION_HASH; export const METAMETRICS_SETTINGS_LINK = ZENDESK_URLS.METAMETRICS_SETTINGS; diff --git a/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.test.tsx b/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.test.tsx index 78a5a9f09cf8..abe361fbed2f 100644 --- a/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.test.tsx +++ b/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.test.tsx @@ -34,7 +34,7 @@ describe('ShieldCoverageAlertMessage', () => { expect(mockCaptureShieldCtaClickedEvent).toHaveBeenCalledWith({ source: ShieldMetricsSourceEnum.PostTransaction, ctaActionClicked: ShieldCtaActionClickedEnum.WhatsCovered, - redirectToUrl: 'https://metamask.io/transaction-shield', + redirectToUrl: 'https://metamask.com/transaction-shield', }); }); }); diff --git a/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.tsx b/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.tsx index bc548c7a3304..60e6b71c4738 100644 --- a/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.tsx +++ b/ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.tsx @@ -13,7 +13,7 @@ import { } from '../../../../../../shared/constants/subscriptions'; const SHIELD_LEARN_HOW_COVERAGE_WORKS_URL = - 'https://metamask.io/transaction-shield'; + 'https://metamask.com/transaction-shield'; const COVERAGE_AMOUNT = '$10,000'; diff --git a/ui/pages/money/constants/urls.ts b/ui/pages/money/constants/urls.ts index fb3bd601771c..46e283f56f54 100644 --- a/ui/pages/money/constants/urls.ts +++ b/ui/pages/money/constants/urls.ts @@ -3,10 +3,10 @@ * benefits" / "Learn more". */ export const MONEY_LANDING_URL = - 'https://metamask.io/money?utm_source=extension'; + 'https://metamask.com/money?utm_source=extension'; /** * mUSD price page — same destination mobile opens for "Meet mUSD". */ export const MUSD_PRICE_URL = - 'https://metamask.io/price/metamask-usd?utm_source=extension'; + 'https://metamask.com/price/metamask-usd?utm_source=extension'; diff --git a/ui/pages/money/money-home-page.test.tsx b/ui/pages/money/money-home-page.test.tsx index f7876f88410f..fc78bc07949e 100644 --- a/ui/pages/money/money-home-page.test.tsx +++ b/ui/pages/money/money-home-page.test.tsx @@ -365,7 +365,7 @@ describe('MoneyHomePage', () => { }); expect(global.platform.openTab).toHaveBeenCalledWith({ - url: 'https://metamask.io/money?utm_source=extension', + url: 'https://metamask.com/money?utm_source=extension', }); }); @@ -661,13 +661,13 @@ describe('MoneyHomePage', () => { screen.getByRole('link', { name: messages.moneyMeetMusd.message }), ).toHaveAttribute( 'href', - 'https://metamask.io/price/metamask-usd?utm_source=extension', + 'https://metamask.com/price/metamask-usd?utm_source=extension', ); expect( screen.getByRole('link', { name: messages.moneyExploreBenefits.message, }), - ).toHaveAttribute('href', 'https://metamask.io/money?utm_source=extension'); + ).toHaveAttribute('href', 'https://metamask.com/money?utm_source=extension'); expect( screen.getByRole('link', { name: messages.moneyHowYourMoneyGrows.message, @@ -796,7 +796,7 @@ describe('MoneyHomePage', () => { fireEvent.click(screen.getByTestId('money-condensed-info-card-musd')); expect(global.platform.openTab).toHaveBeenCalledWith({ - url: 'https://metamask.io/price/metamask-usd?utm_source=extension', + url: 'https://metamask.com/price/metamask-usd?utm_source=extension', }); }); @@ -819,7 +819,7 @@ describe('MoneyHomePage', () => { fireEvent.click(screen.getByTestId('money-condensed-info-card-benefits')); expect(global.platform.openTab).toHaveBeenCalledWith({ - url: 'https://metamask.io/money?utm_source=extension', + url: 'https://metamask.com/money?utm_source=extension', }); }); From 1b53a60fd2b098a2102c3bee2ae04adcf7d87cda Mon Sep 17 00:00:00 2001 From: Gauthier Petetin Date: Mon, 9 Nov 2026 15:17:22 +0100 Subject: [PATCH 2/2] chore: fix lint and unit tests for metamask.com URLs Fix oxfmt formatting in constants and money page tests, and update the restoring tab URL matcher to expect metamask.com. Co-authored-by: Cursor --- .../lib/critical-error/critical-error-tab-handoff.test.ts | 2 +- ui/helpers/constants/common.ts | 3 ++- ui/pages/money/money-home-page.test.tsx | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts b/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts index c98ea50871a0..554ac7a13204 100644 --- a/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts +++ b/app/scripts/lib/critical-error/critical-error-tab-handoff.test.ts @@ -185,7 +185,7 @@ describe('openRestoringTabAndReload', () => { expect(browser.tabs.create).toHaveBeenCalledWith( expect.objectContaining({ active: true, - url: expect.stringMatching(/^https:\/\/metamask\.io\/restoring#/u), + url: expect.stringMatching(/^https:\/\/metamask\.com\/restoring#/u), }), ); diff --git a/ui/helpers/constants/common.ts b/ui/helpers/constants/common.ts index 9e010d3bdbd2..dec779cc31f5 100644 --- a/ui/helpers/constants/common.ts +++ b/ui/helpers/constants/common.ts @@ -7,7 +7,8 @@ const _contractAddressLink = ZENDESK_URLS.CONTRACT_ADDRESS_WARNING; export const TRANSACTION_SHIELD_SUPPORT_LINK = ZENDESK_URLS.TRANSACTION_SHIELD; -export const TRANSACTION_SHIELD_LINK = 'https://metamask.com/transaction-shield'; +export const TRANSACTION_SHIELD_LINK = + 'https://metamask.com/transaction-shield'; export const FIND_TRANSACTION_HASH_LINK = ZENDESK_URLS.FIND_TRANSACTION_HASH; export const METAMETRICS_SETTINGS_LINK = ZENDESK_URLS.METAMETRICS_SETTINGS; diff --git a/ui/pages/money/money-home-page.test.tsx b/ui/pages/money/money-home-page.test.tsx index fc78bc07949e..400476d7135b 100644 --- a/ui/pages/money/money-home-page.test.tsx +++ b/ui/pages/money/money-home-page.test.tsx @@ -667,7 +667,10 @@ describe('MoneyHomePage', () => { screen.getByRole('link', { name: messages.moneyExploreBenefits.message, }), - ).toHaveAttribute('href', 'https://metamask.com/money?utm_source=extension'); + ).toHaveAttribute( + 'href', + 'https://metamask.com/money?utm_source=extension', + ); expect( screen.getByRole('link', { name: messages.moneyHowYourMoneyGrows.message,