Commit a7fad31
authored
chore: Update gator-permissions-controller package to comply with 7715 spec revisions (#7613)
## Explanation
This PR updates the `@metamask/gator-permissions-controller` package to
comply with 7715 spec revisions:
- Bumps `@metamask/7715-permission-types`: `0.4.0` -> `0.5.0`
- Updated core logic to resolve type compatibility issues
## References
* Requires MetaMask/smart-accounts-kit#128
* Related to ERC-7715: [Simplify specification to ease wallet
implementation](ethereum/ERCs#1098)
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> - **Dependency bump:** `@metamask/7715-permission-types` to `^0.5.0`.
> - **BREAKING types:** Replace `address`/`signer` with `from`/`to`;
rename `dependencyInfo` → `dependencies`; surface `delegationManager`.
Update `PermissionRequest`, `PermissionResponse`,
`StoredGatorPermission`, and `*Sanitized` (`sanitize` now removes
`dependencies` and `to`).
> - **Decoding changes:** `DecodedPermission` now returns `from`/`to`;
`reconstructDecodedPermission` and controller
`decodePermissionFromPermissionContextForOrigin` updated accordingly.
> - **Controller updates:** Adjust sanitization/categorization to new
shapes; add explicit return types; no behavior change beyond new field
names.
> - **Tests/mocks:** Updated fixtures and assertions to new fields;
added expectations for sanitization. Changelog notes breaking change.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
34a21f4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent d4c3591 commit a7fad31
File tree
12 files changed
+164
-247
lines changed- packages/gator-permissions-controller
- src
- decodePermission
- test
12 files changed
+164
-247
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | 1095 | | |
1099 | 1096 | | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | 1097 | | |
1104 | 1098 | | |
1105 | 1099 | | |
1106 | 1100 | | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
| 1101 | + | |
1113 | 1102 | | |
1114 | 1103 | | |
1115 | 1104 | | |
| |||
1128 | 1117 | | |
1129 | 1118 | | |
1130 | 1119 | | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | 1120 | | |
1137 | 1121 | | |
1138 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 51 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
67 | 65 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
84 | 82 | | |
85 | | - | |
86 | | - | |
| 83 | + | |
87 | 84 | | |
88 | 85 | | |
89 | 86 | | |
| |||
246 | 243 | | |
247 | 244 | | |
248 | 245 | | |
249 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
255 | | - | |
| 253 | + | |
| 254 | + | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
| |||
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 290 | + | |
| 291 | + | |
296 | 292 | | |
297 | 293 | | |
298 | 294 | | |
| |||
301 | 297 | | |
302 | 298 | | |
303 | 299 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 300 | + | |
| 301 | + | |
308 | 302 | | |
309 | 303 | | |
310 | 304 | | |
| |||
490 | 484 | | |
491 | 485 | | |
492 | 486 | | |
493 | | - | |
| 487 | + | |
494 | 488 | | |
495 | 489 | | |
496 | 490 | | |
| 491 | + | |
497 | 492 | | |
498 | 493 | | |
499 | 494 | | |
| |||
607 | 602 | | |
608 | 603 | | |
609 | 604 | | |
610 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
611 | 608 | | |
612 | 609 | | |
613 | 610 | | |
| |||
692 | 689 | | |
693 | 690 | | |
694 | 691 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
| 692 | + | |
| 693 | + | |
700 | 694 | | |
701 | 695 | | |
702 | 696 | | |
| |||
Lines changed: 18 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
340 | | - | |
| 339 | + | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | 350 | | |
352 | | - | |
| 351 | + | |
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
| |||
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
361 | | - | |
| 360 | + | |
362 | 361 | | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
368 | 367 | | |
369 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| |||
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
428 | | - | |
| 429 | + | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
448 | | - | |
449 | | - | |
450 | | - | |
| 449 | + | |
451 | 450 | | |
452 | 451 | | |
453 | 452 | | |
| |||
462 | 461 | | |
463 | 462 | | |
464 | 463 | | |
465 | | - | |
| 464 | + | |
466 | 465 | | |
467 | 466 | | |
468 | 467 | | |
| |||
480 | 479 | | |
481 | 480 | | |
482 | 481 | | |
483 | | - | |
| 482 | + | |
484 | 483 | | |
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
488 | 487 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 488 | + | |
| 489 | + | |
494 | 490 | | |
495 | | - | |
| 491 | + | |
496 | 492 | | |
497 | 493 | | |
498 | 494 | | |
| |||
509 | 505 | | |
510 | 506 | | |
511 | 507 | | |
512 | | - | |
| 508 | + | |
513 | 509 | | |
514 | 510 | | |
515 | 511 | | |
| |||
570 | 566 | | |
571 | 567 | | |
572 | 568 | | |
573 | | - | |
| 569 | + | |
574 | 570 | | |
575 | 571 | | |
576 | 572 | | |
577 | 573 | | |
578 | 574 | | |
579 | 575 | | |
580 | | - | |
| 576 | + | |
581 | 577 | | |
582 | 578 | | |
583 | 579 | | |
| |||
641 | 637 | | |
642 | 638 | | |
643 | 639 | | |
644 | | - | |
| 640 | + | |
645 | 641 | | |
646 | 642 | | |
647 | 643 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
| 1207 | + | |
| 1208 | + | |
1212 | 1209 | | |
1213 | 1210 | | |
1214 | 1211 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
0 commit comments