MetaMask / MetaMask/metamask-extension

Add new types parameter for signTypedData_v4 signature events

Open
#18,779 0 comments 0 reactions 1 assignee Claimed by @bschorchit View on GitHub
area-metrics area-signatures team-confirmations-planning type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Background
SignTypedData_v4 signatures have a types parameter in their spec and capturing that parameter will allow us to better understand what signatures are being used the most and direct our future efforts accordingly. This also aims to replace tracking plannes specifically for the permit signature https://github.com/MetaMask/metamask-extension/issues/17404.

### Acceptance Criteria
1. Whenever a user that has opted in metametrics is **requested** a **SignTypedData_v4** signature, a new `signature_schema` (name to be confirmed) property is added to the `Signature Requested` event with the value being the types parameter from that signature request. The specific value for each parameter should not be included.;
2. Whenever a user that has opted in metametrics is **requested** a **SignTypedData_v4** signature, a new `signature_schema` (name to be confirmed) property is added to the `Signature Approved` event with the value being the types parameter from that signature request. The specific value for each parameter should not be included;
3. Whenever a user that has opted in metametrics is **requested** a **SignTypedData_v4** signature, a new `signature_schema` (name to be confirmed) property is added to the `Signature Rejected` event with the value being the types parameter from that signature request. The specific value for each parameter should not be included;
4. Whenever the user is requested, signs or rejects a signature that is not a **SignTypedData_v4** signature, no value is passed to the `signature_schema` property.

### References
[Slack thread](https://consensys.slack.com/archives/G01FXS64DFA/p1675120180936709?thread_ts=1675115541.079239&cid=G01FXS64DFA)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.