@metamask/delegation-core 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.2.1]
11
+
12
+ ### Fixed
13
+
14
+ - Rename `permit2ApproveZero` to `permit2Approve` in `approvalRevocationEnforcer` terms builders and decoders ([#237](https://github.com/MetaMask/smart-accounts-kit/pull/237))
15
+
10
16
  ## [2.2.0]
11
17
 
12
18
  ### Added
@@ -112,7 +118,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112
118
 
113
119
  - Add @metamask/delegation-core package, providing utility types, delegation hashing, and terms encoding for a limited set of caveat enforcers.
114
120
 
115
- [Unreleased]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@2.2.0...HEAD
121
+ [Unreleased]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@2.2.1...HEAD
122
+ [2.2.1]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@2.2.0...@metamask/delegation-core@2.2.1
116
123
  [2.2.0]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@2.1.0...@metamask/delegation-core@2.2.0
117
124
  [2.1.0]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@2.0.0...@metamask/delegation-core@2.1.0
118
125
  [2.0.0]: https://github.com/metamask/smart-accounts-kit/compare/@metamask/delegation-core@1.1.0...@metamask/delegation-core@2.0.0
package/dist/index.cjs CHANGED
@@ -995,7 +995,7 @@ function termsToMask(terms) {
995
995
  if (terms.erc721SetApprovalForAll) {
996
996
  mask |= BIT_SET_APPROVAL_FOR_ALL_REVOKE;
997
997
  }
998
- if (terms.permit2ApproveZero) {
998
+ if (terms.permit2Approve) {
999
999
  mask |= BIT_PERMIT2_APPROVE_ZERO;
1000
1000
  }
1001
1001
  if (terms.permit2Lockdown) {
@@ -1022,7 +1022,7 @@ function maskToTerms(mask) {
1022
1022
  erc20Approve: (mask & BIT_ERC20_APPROVE_ZERO) !== 0,
1023
1023
  erc721Approve: (mask & BIT_ERC721_PER_TOKEN_CLEAR) !== 0,
1024
1024
  erc721SetApprovalForAll: (mask & BIT_SET_APPROVAL_FOR_ALL_REVOKE) !== 0,
1025
- permit2ApproveZero: (mask & BIT_PERMIT2_APPROVE_ZERO) !== 0,
1025
+ permit2Approve: (mask & BIT_PERMIT2_APPROVE_ZERO) !== 0,
1026
1026
  permit2Lockdown: (mask & BIT_PERMIT2_LOCKDOWN) !== 0,
1027
1027
  permit2InvalidateNonces: (mask & BIT_PERMIT2_INVALIDATE_NONCES) !== 0
1028
1028
  };