Skip to content

Conversation

@ffmcgee725
Copy link
Member

@ffmcgee725 ffmcgee725 commented Jan 5, 2026

Explanation

Previously, the wallet_revokeSession function should called with a params value, otherwise it will throw an error due to trying to access scopes on undefined.
This PR updates the function to handle cases where params is not provided, preventing it from throwing an error.

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

Ensures wallet_revokeSession no longer throws when params is omitted and continues to revoke permissions correctly.

  • Update handler to use request.params?.scopes?.length and pass request.params.scopes to partial revoke
  • Add unit test verifying behavior when params is not provided and response remains true
  • Update CHANGELOG.md under Unreleased > Fixed to document the fix

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

@ffmcgee725 ffmcgee725 requested a review from a team as a code owner January 5, 2026 10:55
@ffmcgee725 ffmcgee725 requested a review from a team as a code owner January 5, 2026 10:56
@ffmcgee725
Copy link
Member Author

@metamaskbot publish-preview

@ffmcgee725 ffmcgee725 added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit 9ddbe04 Jan 6, 2026
286 checks passed
@ffmcgee725 ffmcgee725 deleted the jc/WAPI-858 branch January 6, 2026 16:33
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.

3 participants