MetaMask / MetaMask/metamask-mobile

Make Snap `OnClientRequest` to accept `approvalRequestData` and pass it while calling `ApprovalController:addRequest`

Open
#22,600 2 comments 0 reactions 0 assignees View on GitHub
team-core-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

In the send flow, Product wants to display full-page confirmations for non-EVM transaction approvals, similar to how we implemented them for EVM transactions. ([Confirmation task](https://github.com/MetaMask/MetaMask-planning/issues/5708))

Currently, all Snap approvals are presented as modals. To enable full-page confirmations, we need a way to determine whether a `Snap.onClientRequest` originates from the send flow.

The best approach is to use the `requestData` metadata when adding approvals through `ApprovalController.addRequest`. This means we should introduce a generic option to `Snap.onClientRequest` for example, `approvalRequestData` and ensure it’s passed along when creating the approval request.

More context: https://consensys.slack.com/archives/C099HFE1ZHA/p1762175952514429

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Snap.onClientRequest entry point through ApprovalController.addRequest and inspect how request metadata is currently handled. Done means a generic approvalRequestData option can be accepted by Snap.onClientRequest and is passed into the approval request for send-flow confirmation handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.