Skip to content

feat: migrate awaitDeleteDelegationEntry to DelegationController#8286

Open
GuillaumeRx wants to merge 6 commits intomainfrom
gr/migrate-function-delegation-controller
Open

feat: migrate awaitDeleteDelegationEntry to DelegationController#8286
GuillaumeRx wants to merge 6 commits intomainfrom
gr/migrate-function-delegation-controller

Conversation

@GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Mar 24, 2026

Explanation

This migrates the awaitDeleteDelegationEntry function that was defined on the clients side to DelegationController.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Adds new state-mutating behavior driven by TransactionController events; incorrect status/type handling or unsubscribe logic could cause missed deletions or lingering subscriptions, though coverage is included via new unit tests.

Overview
Adds a new DelegationController:awaitDeleteDelegationEntry method/action that subscribes to TransactionController:transactionStatusUpdated and, based on transaction type/status (including replacement via replacedById), deletes a delegation entry and optionally stores a provided replacement entry.

Updates the controller’s messenger types and build refs to allow TransactionController events, adds @metamask/transaction-controller as a dependency, exports the new action type, and adds a focused test suite covering confirmation, drop/fail/reject/cancel, replacement chaining, and unsupported types.

Written by Cursor Bugbot for commit a3263e5. This will update automatically on new commits. Configure here.

@GuillaumeRx GuillaumeRx marked this pull request as ready for review March 24, 2026 15:16
@GuillaumeRx GuillaumeRx requested review from a team as code owners March 24, 2026 15:16
@GuillaumeRx GuillaumeRx force-pushed the gr/migrate-function-delegation-controller branch from 6282ae6 to 1af8a27 Compare March 24, 2026 15:16
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@GuillaumeRx GuillaumeRx enabled auto-merge March 24, 2026 15:34
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.

1 participant