Skip to content

Add CSP guidance to MetaMask Connect troubleshooting - #3022

Merged
shahbaz17 merged 3 commits into
mainfrom
fix/mmc-updates
Aug 13, 2026
Merged

Add CSP guidance to MetaMask Connect troubleshooting#3022
shahbaz17 merged 3 commits into
mainfrom
fix/mmc-updates

Conversation

@shahbaz17

@shahbaz17 shahbaz17 commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description

  • Add a Content Security Policy section to the MetaMask Connect troubleshooting page explaining required directives (wss://mm-sdk-relay.api.cx.metamask.io in connect-src, img-src data:, etc.), example policies, symptoms, and compatibility notes for older packages. Also document provider.request preserving wallet JSON-RPC error.data since @metamask/connect-evm 2.1.0 (and err.rpcData on multichain), note that closing the modal rejects with EIP-1193 4001 since @metamask/connect-multichain 1.2.0, and update Flask/QR-flow troubleshooting and recommended upgrades.
  • Standardizes formatting across Markdown, TypeScript, JSX, and HTML files to match repo linting and readability rules. It updates several doc tables and code snippets for consistency, tweaks product dropdown event handlers to use double-quoted attribute strings, and removes stale lockfile libc entries generated by dependency resolution.

Issue(s) fixed

Fixes #

Preview

Checklist

  • If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
  • If this PR updates or adds documentation content, it has received an approval from a technical writer.

External contributor checklist

  • I've read the contribution guidelines.
  • I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.

Note

Low Risk
Changes are documentation and cosmetic formatting; no runtime application logic beyond HTML attribute quoting in the nav dropdown.

Overview
MetaMask Connect troubleshooting gets a dedicated Content Security Policy section: required connect-src / img-src (and optional analytics, RPC, modal styling), example header and meta policies, a symptom-to-directive table, and notes for older packages that needed extra connect-src for QR fox icons. The QR-code CSP subsection is shortened to point at that guide, and the diagnostic checklist now calls out relay + data: CSP.

The same page documents error.data / err.rpcData on failed wallet calls (EVM 2.1.0+), modal close as EIP-1193 4001 (multichain 1.2.0+), and a new MetaMask Flask entry (Flask RDNS detection and recommended package upgrades). Front matter keywords were updated for CSP and Flask.

Elsewhere the PR is mostly formatting: editorial spacing in AGENTS.md, table/type layout in Smart Accounts Kit reference (including versioned copies), column alignment in the SDK migration option table, Prettier-style tweaks in Card.tsx, Snaps types, quickstart/tutorial imports, and product nav onfocus/onmouseover handlers (double-quoted attributes). package-lock.json drops stale libc fields on optional @parcel/watcher Linux packages.

Reviewed by Cursor Bugbot for commit 27177fc. Bugbot is set up for automated code reviews on this repo. Configure here.

Add a Content Security Policy section to the MetaMask Connect troubleshooting page explaining required directives (wss://mm-sdk-relay.api.cx.metamask.io in connect-src, img-src data:, etc.), example policies, symptoms, and compatibility notes for older packages. Also document provider.request preserving wallet JSON-RPC error.data since @metamask/connect-evm 2.1.0 (and err.rpcData on multichain), note that closing the modal rejects with EIP-1193 4001 since @metamask/connect-multichain 1.2.0, and update Flask/QR-flow troubleshooting and recommended upgrades.
This commit standardizes formatting across Markdown, TypeScript, JSX, and HTML files to match repo linting and readability rules. It updates several doc tables and code snippets for consistency, tweaks product dropdown event handlers to use double-quoted attribute strings, and removes stale lockfile libc entries generated by dependency resolution.
@shahbaz17
shahbaz17 requested review from a team as code owners August 13, 2026 11:43
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
metamask-docs Ready Ready Preview Aug 13, 2026 11:47am

Request Review

@AyushBherwani1998 AyushBherwani1998 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, i assume other changes are prettier changes.

@shahbaz17

Copy link
Copy Markdown
Member Author

LGTM, i assume other changes are prettier changes.

Yes, the npm run format

@shahbaz17
shahbaz17 merged commit f7f8051 into main Aug 13, 2026
19 checks passed
@shahbaz17
shahbaz17 deleted the fix/mmc-updates branch August 13, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants