Skip to content

Commit a73dcf1

Browse files
chore: point perps support URLs at metamask.com (#47784)
## **Description** Part of the migration of MetaMask web properties to the `metamask.com` domain, scoped to files owned by the perps team. Updates the perps support, FAQ and ADL article URLs in `shared/constants/perps.ts`, the perps controller mock and its test. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: N/A ## **Manual testing steps** 1. Run the extension with `yarn start`. 2. Open the perps experience and trigger the service interruption banner. 3. Confirm the FAQ and support links point at `support.metamask.com`. <!-- ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > URL constant and test expectation updates only; no logic or security changes. > > **Overview** > Migrates **Perps-facing help and marketing URLs** from `metamask.io` to `metamask.com`, aligned with the broader web properties migration and mobile `perpsConfig`. > > In **`shared/constants/perps.ts`**, `SUPPORT_CONFIG`, the service interruption **FAQ** link, and the **ADL** support article now use `support.metamask.com` (UTM params unchanged). The perps controller **mock** updates the learn-more external URL and ADL article to match; **unit tests** for the mock and `PerpsServiceInterruptionBanner` assert the new domains for FAQ, support consent modal, and help center links. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4e3e1dc. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent e1d5868 commit a73dcf1

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎shared/constants/perps.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function normalizeMarketFilter(filter: string): MarketFilter | null {
7070
* Contact support (Help Center). Single source of truth aligned with mobile perpsConfig.
7171
*/
7272
export const SUPPORT_CONFIG = {
73-
Url: 'https://support.metamask.io/?utm_source=extension',
73+
Url: 'https://support.metamask.com/?utm_source=extension',
7474
} as const;
7575

7676
/**
@@ -81,7 +81,7 @@ export const SUPPORT_CONFIG = {
8181
*/
8282
export const SERVICE_INTERRUPTION_CONFIG = {
8383
FaqUrl:
84-
'https://support.metamask.io/trade/perps/troubleshoot/?utm_source=extension',
84+
'https://support.metamask.com/trade/perps/troubleshoot/?utm_source=extension',
8585
SupportUrl: SUPPORT_CONFIG.Url,
8686
} as const;
8787

@@ -97,5 +97,5 @@ export const FEEDBACK_CONFIG = {
9797
*/
9898
export const PERPS_SUPPORT_ARTICLES_URLS = {
9999
AdlUrl:
100-
'https://support.metamask.io/manage-crypto/trade/perps/leverage-and-liquidation/?utm_source=extension#what-is-auto-deleveraging-adl',
100+
'https://support.metamask.com/manage-crypto/trade/perps/leverage-and-liquidation/?utm_source=extension#what-is-auto-deleveraging-adl',
101101
} as const;

‎ui/__mocks__/perps/perps-controller/index.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
describe('@metamask/perps-controller mock', () => {
1010
it('exports SUPPORT_CONFIG with the expected URL and UI keys', () => {
1111
expect(SUPPORT_CONFIG.Url).toBe(
12-
'https://support.metamask.io/?utm_source=extension',
12+
'https://support.metamask.com/?utm_source=extension',
1313
);
1414
expect(SUPPORT_CONFIG.TitleKey).toBe('perps.support.title');
1515
expect(SUPPORT_CONFIG.DescriptionKey).toBe('perps.support.description');

‎ui/__mocks__/perps/perps-controller/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export type SortButtonPreset =
488488
* External resources and content for Perps education
489489
*/
490490
export const LEARN_MORE_CONFIG = {
491-
ExternalUrl: 'https://metamask.io/perps',
491+
ExternalUrl: 'https://metamask.com/perps',
492492
TitleKey: 'perps.tutorial.card.title',
493493
DescriptionKey: 'perps.learn_more.description',
494494
CtaKey: 'perps.learn_more.cta',
@@ -515,7 +515,7 @@ export const FEEDBACK_CONFIG = {
515515
*/
516516
export const PERPS_SUPPORT_ARTICLES_URLS = {
517517
AdlUrl:
518-
'https://support.metamask.io/manage-crypto/trade/perps/leverage-and-liquidation/?utm_source=extension#what-is-auto-deleveraging-adl',
518+
'https://support.metamask.com/manage-crypto/trade/perps/leverage-and-liquidation/?utm_source=extension#what-is-auto-deleveraging-adl',
519519
} as const;
520520

521521
/**

‎ui/components/app/perps/perps-service-interruption-banner/perps-service-interruption-banner.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('PerpsServiceInterruptionBanner', () => {
8888

8989
expect(faqLink).toHaveAttribute(
9090
'href',
91-
'https://support.metamask.io/trade/perps/troubleshoot/?utm_source=extension',
91+
'https://support.metamask.com/trade/perps/troubleshoot/?utm_source=extension',
9292
);
9393
expect(faqLink).toHaveAttribute('href', SERVICE_INTERRUPTION_CONFIG.FaqUrl);
9494
expect(faqLink).toHaveAttribute('target', '_blank');
@@ -110,7 +110,7 @@ describe('PerpsServiceInterruptionBanner', () => {
110110

111111
expect(modal).toHaveAttribute(
112112
'data-support-link',
113-
'https://support.metamask.io/?utm_source=extension',
113+
'https://support.metamask.com/?utm_source=extension',
114114
);
115115
expect(modal).toHaveAttribute(
116116
'data-support-link',

0 commit comments

Comments
 (0)