Skip to content

fix: rename permit2ApproveZero to permit2Approve#237

Merged
jeffsmale90 merged 2 commits into
mainfrom
fix/permit2_approve
May 19, 2026
Merged

fix: rename permit2ApproveZero to permit2Approve#237
jeffsmale90 merged 2 commits into
mainfrom
fix/permit2_approve

Conversation

@jeffsmale90

@jeffsmale90 jeffsmale90 commented May 19, 2026

Copy link
Copy Markdown
Collaborator

📝 Description

The terms property for ApprovalRevocationEnforcer, and data property for token-approval-revocation ERC-7715 permission type was incorrectly specified as permit2ApproveZero. This PR corrects that to permit2Approve.

🔄 What Changed?

List the specific changes made:

  • TokenApprovalRevocationPermission in @metamask/7715-permission-types updated
  • ApprovalRevocationTerms updated in core terms encoder / decoder
  • ERC-7715 wallet actions data mapping updated

🚀 Why?

Explain the motivation behind these changes:

Corrects inconsistency in public facing APIs.

🧪 How to Test?

Describe how to test these changes:

  • Manual testing steps:
  • Automated tests added/updated
  • All existing tests pass

⚠️ Breaking Changes

List any breaking changes:

  • No breaking changes
  • Breaking changes (describe below):

📋 Checklist

Check off completed items:

  • Code follows the project's coding standards
  • Self-review completed
  • Documentation updated (if needed)
  • Tests added/updated
  • Changelog updated (if needed)
  • All CI checks pass

🔗 Related Issues

Link to related issues:
Closes #
Related to #

📚 Additional Notes

Any additional information, concerns, or context:


Note

Medium Risk
Renames a public-facing field in ERC-7715 permission and approval-revocation terms; consumers sending/expecting permit2ApproveZero will break until updated. Logic remains the same but the change touches encoding/decoding and RPC mapping surfaces.

Overview
Fixes an API naming mismatch by renaming the Permit2 revocation flag from permit2ApproveZero to permit2Approve across the ERC-7715 token-approval-revocation permission type and ApprovalRevocationEnforcer terms.

Updates the core bitmask encoder/decoder, smart-accounts-kit RPC mapping, and unit/e2e tests and changelogs to use the corrected field name.

Reviewed by Cursor Bugbot for commit b273be2. Bugbot is set up for automated code reviews on this repo. Configure here.

@jeffsmale90 jeffsmale90 marked this pull request as ready for review May 19, 2026 21:20
@jeffsmale90 jeffsmale90 requested a review from a team as a code owner May 19, 2026 21:20
@jeffsmale90 jeffsmale90 force-pushed the fix/permit2_approve branch from a14d734 to b273be2 Compare May 19, 2026 21:23

@mj-kiwi mj-kiwi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeffsmale90 jeffsmale90 merged commit f2ad98a into main May 19, 2026
14 checks passed
@jeffsmale90 jeffsmale90 deleted the fix/permit2_approve branch May 19, 2026 21:33
@cursor cursor Bot mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants