MetaMask / MetaMask/metamask-extension

[Bug]: Advanced Permissions requests fail with `Invalid input`

Open
#42,181 0 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

When serving `wallet_grantExecutionPermissions` requests, the RPC returns early with `Invalid input` error.

## Reproduction steps

- visit the Advanced Permissions development site https://github.com/MetaMask/snap-7715-permissions/tree/main/packages/site
- click "Grant Permissions"
- click "Grant" on the Permission Picker dialog

**Actual**
Error is returned.

**Expected**
Sign permission confirmation is shown.

## Root cause

This is a result of the tighter `eth_signTypedData_v4` validation in https://github.com/MetaMask/core/pull/8526 that expressly forbids extraneous properties in the `eth_signTypedData_v4` payload.

Advanced Permissions specifies `metadata` as a top level property on the payload, which is not included in the `types` being signed.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the wallet_grantExecutionPermissions RPC flow and its eth_signTypedData_v4 payload handling, using the Advanced Permissions development site at packages/site to reproduce the failure. Confirm that the request reaches the permission confirmation instead of returning Invalid input, while preserving the stricter validation for unrelated payloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.