Skip to content

Commit 0f859d9

Browse files
chore: point SIWE community URLs at metamask.com in confirmations fixtures (#47782)
## **Description** Part of the migration of MetaMask web properties to the `metamask.com` domain, scoped to files owned by the confirmations team. Updates the shield coverage and enforced simulations links, and migrates the SIWE terms-of-service URL in the personal sign fixtures, unit snapshot and domain-mismatch alert test. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: N/A ## **Manual testing steps** 1. Run the extension with `yarn start`. 2. Start a SIWE sign-in request from the test dapp and confirm the statement renders with the `community.metamask.com/tos` URL and no unexpected domain-mismatch alert appears for a matching domain. 3. Open a transaction confirmation with shield coverage enabled and confirm the "See what's covered" link points at `metamask.com/transaction-shield`. <!-- ## **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** > String and fixture URL updates only; no auth, transaction, or signing logic changes. > > **Overview** > Updates confirmations-owned **external links and fixtures** for the MetaMask domain migration from `metamask.io` to `metamask.com`. > > SIWE personal-sign test data, snapshots, and domain-mismatch alert tests now use **`https://community.metamask.com/tos`** in statements and matching hex `data` payloads. Transaction confirmation UI points **“See what's covered”** at **`https://metamask.com/transaction-shield`**, with the metrics test expectation updated accordingly. The enforced simulations **“Learn more”** link now uses **`https://support.metamask.com/manage-crypto/transactions/simulations/`**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5f8ed7e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent e516bc7 commit 0f859d9

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎test/data/confirmations/personal_sign.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const signatureRequestSIWE = {
3535
type: 'personal_sign',
3636
msgParams: {
3737
from: '0x935e73edb9ff52e23bac7f7e049a1ecd06d05477',
38-
data: '0x6d6574616d61736b2e6769746875622e696f2077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078393335653733656462396666353265323362616337663765303433613165636430366430353437370a0a492061636365707420746865204d6574614d61736b205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e696f2f746f730a0a5552493a2068747470733a2f2f6d6574616d61736b2e6769746875622e696f0a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2033323839313735370a4973737565642041743a20323032312d30392d33305431363a32353a32342e3030305a',
38+
data: '0x6d6574616d61736b2e6769746875622e696f2077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078393335653733656462396666353265323362616337663765303433613165636430366430353437370a0a492061636365707420746865204d6574614d61736b205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e636f6d2f746f730a0a5552493a2068747470733a2f2f6d6574616d61736b2e6769746875622e696f0a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2033323839313735370a4973737565642041743a20323032312d30392d33305431363a32353a32342e3030305a',
3939
signatureMethod: 'personal_sign',
4040
origin: 'https://metamask.github.io',
4141
siwe: {
@@ -51,7 +51,7 @@ export const signatureRequestSIWE = {
5151
requestId: 'some_id',
5252
scheme: null,
5353
statement:
54-
'I accept the MetaMask Terms of Service: https://community.metamask.io/tos',
54+
'I accept the MetaMask Terms of Service: https://community.metamask.com/tos',
5555
uri: 'https://metamask.github.io',
5656
version: '1',
5757
resources: null,
@@ -75,7 +75,7 @@ export const SignatureRequestSIWEWithResources = {
7575
type: 'personal_sign',
7676
msgParams: {
7777
from: '0x935e73edb9ff52e23bac7f7e049a1ecd06d05477',
78-
data: '0x6d6574616d61736b2e6769746875622e696f2077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078393335653733656462396666353265323362616337663765303433613165636430366430353437370a0a492061636365707420746865204d6574614d61736b205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e696f2f746f730a0a5552493a2068747470733a2f2f6d6574616d61736b2e6769746875622e696f0a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2033323839313735370a4973737565642041743a20323032312d30392d33305431363a32353a32342e3030305a',
78+
data: '0x6d6574616d61736b2e6769746875622e696f2077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078393335653733656462396666353265323362616337663765303433613165636430366430353437370a0a492061636365707420746865204d6574614d61736b205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e636f6d2f746f730a0a5552493a2068747470733a2f2f6d6574616d61736b2e6769746875622e696f0a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2033323839313735370a4973737565642041743a20323032312d30392d33305431363a32353a32342e3030305a',
7979
signatureMethod: 'personal_sign',
8080
origin: 'https://metamask.github.io',
8181
siwe: {
@@ -91,7 +91,7 @@ export const SignatureRequestSIWEWithResources = {
9191
requestId: 'some_id',
9292
scheme: null,
9393
statement:
94-
'I accept the MetaMask Terms of Service: https://community.metamask.io/tos',
94+
'I accept the MetaMask Terms of Service: https://community.metamask.com/tos',
9595
uri: 'https://metamask.github.io',
9696
version: '1',
9797
resources: [

‎ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/__snapshots__/siwe-sign.test.tsx.snap‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports[`SIWESignInfo renders correctly for SIWE signature request 1`] = `
4949
class="mm-box mm-text mm-text--body-md mm-box--color-inherit"
5050
style="white-space: pre-wrap;"
5151
>
52-
I accept the MetaMask Terms of Service: https://community.metamask.io/tos
52+
I accept the MetaMask Terms of Service: https://community.metamask.com/tos
5353
</p>
5454
<div
5555
class="mm-box confirm-info-row mm-box--margin-top-2 mm-box--margin-bottom-2 mm-box--padding-right-2 mm-box--padding-left-2 mm-box--display-flex mm-box--flex-direction-row mm-box--flex-wrap-wrap mm-box--justify-content-space-between mm-box--align-items-flex-start mm-box--color-text-default mm-box--rounded-lg"
@@ -356,7 +356,7 @@ exports[`SIWESignInfo renders correctly for SIWE signature request with resource
356356
class="mm-box mm-text mm-text--body-md mm-box--color-inherit"
357357
style="white-space: pre-wrap;"
358358
>
359-
I accept the MetaMask Terms of Service: https://community.metamask.io/tos
359+
I accept the MetaMask Terms of Service: https://community.metamask.com/tos
360360
</p>
361361
<div
362362
class="mm-box confirm-info-row mm-box--margin-top-2 mm-box--margin-bottom-2 mm-box--padding-right-2 mm-box--padding-left-2 mm-box--display-flex mm-box--flex-direction-row mm-box--flex-wrap-wrap mm-box--justify-content-space-between mm-box--align-items-flex-start mm-box--color-text-default mm-box--rounded-lg"

‎ui/pages/confirmations/components/rows/enforced-simulations-row/enforced-simulations-row.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { useTransactionEventFragment } from '../../../hooks/useTransactionEventF
3535
import { getEnforcedSimulationsSlippageBasisPoints } from '../../../../../../shared/lib/transaction/enforced-simulations';
3636

3737
const ADDED_PROTECTION_LEARN_MORE_URL =
38-
'https://support.metamask.io/manage-crypto/transactions/simulations/';
38+
'https://support.metamask.com/manage-crypto/transactions/simulations/';
3939

4040
export function EnforcedSimulationsRow() {
4141
const { currentConfirmation } = useConfirmContext<TransactionMeta>();

‎ui/pages/confirmations/hooks/alerts/signatures/useDomainMismatchAlerts.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const mockSiwe = {
2020
domain: MOCK_SUSPICIOUS_DOMAIN,
2121
address: MOCK_ADDRESS,
2222
statement:
23-
'Click to sign in and accept the Terms of Service: https://community.metamask.io/tos',
23+
'Click to sign in and accept the Terms of Service: https://community.metamask.com/tos',
2424
uri: 'http://localhost:8080',
2525
version: '1',
2626
nonce: 'STMt6KQMwwdOXE306',
@@ -40,7 +40,7 @@ const mockCurrentConfirmation = {
4040
type: ApprovalType.PersonalSign,
4141
msgParams: {
4242
from: MOCK_ADDRESS,
43-
data: '0x6c6f63616c686f73743a383038302077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078466232433135303034333433393034653566343038323537386334653865313131303563463765330a0a436c69636b20746f207369676e20696e20616e642061636365707420746865205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e696f2f746f730a0a5552493a20687474703a2f2f6c6f63616c686f73743a383038300a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2053544d74364b514d7777644f58453330360a4973737565642041743a20323032322d30332d31385432313a34303a34302e3832335a0a5265736f75726365733a0a2d20697066733a2f2f516d653773733341525667787636725871565069696b4d4a3875324e4c676d67737a673133705972444b456f69750a2d2068747470733a2f2f6578616d706c652e636f6d2f6d792d776562322d636c61696d2e6a736f6e',
43+
data: '0x6c6f63616c686f73743a383038302077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078466232433135303034333433393034653566343038323537386334653865313131303563463765330a0a436c69636b20746f207369676e20696e20616e642061636365707420746865205465726d73206f6620536572766963653a2068747470733a2f2f636f6d6d756e6974792e6d6574616d61736b2e636f6d2f746f730a0a5552493a20687474703a2f2f6c6f63616c686f73743a383038300a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a2053544d74364b514d7777644f58453330360a4973737565642041743a20323032322d30332d31385432313a34303a34302e3832335a0a5265736f75726365733a0a2d20697066733a2f2f516d653773733341525667787636725871565069696b4d4a3875324e4c676d67737a673133705972444b456f69750a2d2068747470733a2f2f6578616d706c652e636f6d2f6d792d776562322d636c61696d2e6a736f6e',
4444
origin: MOCK_ORIGIN,
4545
siwe: mockSiwe,
4646
},

‎ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('ShieldCoverageAlertMessage', () => {
3434
expect(mockCaptureShieldCtaClickedEvent).toHaveBeenCalledWith({
3535
source: ShieldMetricsSourceEnum.PostTransaction,
3636
ctaActionClicked: ShieldCtaActionClickedEnum.WhatsCovered,
37-
redirectToUrl: 'https://metamask.io/transaction-shield',
37+
redirectToUrl: 'https://metamask.com/transaction-shield',
3838
});
3939
});
4040
});

‎ui/pages/confirmations/hooks/alerts/transactions/ShieldCoverageAlertMessage.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '../../../../../../shared/constants/subscriptions';
1414

1515
const SHIELD_LEARN_HOW_COVERAGE_WORKS_URL =
16-
'https://metamask.io/transaction-shield';
16+
'https://metamask.com/transaction-shield';
1717

1818
const COVERAGE_AMOUNT = '$10,000';
1919

0 commit comments

Comments
 (0)