Add third party details for offchain signatures
Description
This enhancement will add third party details to the "View third-party details" popup for offchain signatures, like we have for onchain signatures (such as setApprovalForAll).
For example: when a permit signature is requesting spending on a users ERC20 balance, MetaMask UI shows only the ERC20 token contract in the third-party details popup when it should show the spender as well. Arguably, the third party in these types of messages is the spender and not the verifyingContract.
We already have this breakdown of contract and spender for onchain signatures, such as setApprovalForAll() - see screenshot below
This change will modify the popup to extract relevant keys from structured sign typed data standards (such as permit or 0x orders) and show the user the third-party beneficiary.
Related issues
Fixes:
Manual testing steps
- Go to this page https://metamask.github.io/test-dapp/
- Test various signatures that give some sort of third-party spending approval
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] I've clearly explained what problem this PR is solving and how it is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [ ] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.
we will rework insights from this PR into another PR
This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.
This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.