Skip to content

[pull] main from MetaMask:main#351

Merged
pull[bot] merged 1 commit into
Reality2byte:mainfrom
MetaMask:main
Nov 25, 2025
Merged

[pull] main from MetaMask:main#351
pull[bot] merged 1 commit into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull

@pull pull Bot commented Nov 25, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Related issue:
https://consensyssoftware.atlassian.net/jira/polaris/projects/MWMR/ideas/view/8845676?selectedIssue=MWMR-10

## Description

Reorganized deeplink-related files and folders, and remove some unused
code

**Impact:** None - pure refactoring, no behavior changes

## Changelog

```
CHANGELOG entry: null
```
_(Internal refactoring only, no user-facing changes)_

## Manual Testing Steps

**Given** the app is unlocked  
**When** I trigger any deeplink (via URL, QR code, push notification, or
in-app browser)
**Then** the deeplink routes correctly to the expected screen

**Test coverage:**
- `metamask://swap` → Opens swap screen
- `https://metamask.app.link/buy` → Opens buy crypto flow
- QR code scans with deeplinks work
- Push notification deeplinks work

## Pre-merge Author Checklist

- [x] I've followed MetaMask Coding Standards
- [x] I've clearly explained the changes
- [x] I've included manual testing steps
- [x] I've added/updated tests (32 test suites, 353 tests passing)
- [x] I've run `yarn lint:tsc` ✅
- [x] I've run `yarn eslint --fix` ✅
- [x] All tests pass ✅

## Test Results

```
✅ 32/32 test suites passed
✅ 353/353 tests passed  
✅ 0 ESLint errors
✅ 0 TypeScript errors
```

---

<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Reorganizes deeplink code into a new module structure (legacy handlers
+ v2 router/handlers), updates app imports/usages, and refreshes tests
without changing behavior.
> 
> - **Core Deeplink Architecture**:
> - Introduces v2 system (`handlers/v2`, `router`, `registry`,
`normalization`, `types`, `utils`) with `BaseHandler`,
`NavigationHandler`, `SendHandler`, `SwapHandler`, `UniversalRouter`,
`HandlerRegistry`, and `CoreLinkNormalizer`.
> - Adds central exports in `core/DeeplinkManager/index.ts` and
integration layer `UniversalRouterIntegration`.
> - **Legacy Handlers**:
> - Moves existing handlers under `handlers/legacy` and updates internal
imports (e.g., `handleEthereumUrl`, `handleMetaMaskDeeplink`,
`handleUniversalLink`, `switchNetwork`).
> - Adds small wrapper re-exports (`handleRampUrl`,
`handleDepositCashUrl`).
>   - Updates `parseDeeplink` to reference new paths/utilities.
> - **App Updates**:
> - Switches to `SharedDeeplinkManager` in `components/UI/Navbar` and
adjusts QR scanner comment link.
> - Updates Rewards `ActiveBoosts` to import `handleDeeplink` from new
path.
> - **Tests**:
> - Refreshes all mocks/imports to new locations; adds comprehensive
tests for v2 handlers, router, registry, normalization, and updated
legacy handlers.
> - Adjusts saga and DeeplinkManager tests to new `handleDeeplink` path
and notification flows.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bd54982. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Nov 25, 2025
@pull pull Bot added the ⤵️ pull label Nov 25, 2025
@pull pull Bot merged commit a761f19 into Reality2byte:main Nov 25, 2025
2 of 12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant