Skip to content

refactor: descriptive caip25CaveatBuilder unsupported scopes #5806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wenfix
Copy link

@wenfix wenfix commented May 14, 2025

Explanation

Currently the exception thrown by caip25CaveatBuilder validator doesn't reference the unsupported scopes that caused it. With this change we list all the scopes that failed validation on the exception message when throwing it.

References

Fixes https://github.com/MetaMask/MetaMask-planning/issues/4855

Changelog

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@wenfix wenfix marked this pull request as ready for review May 14, 2025 17:49
@wenfix wenfix requested review from a team as code owners May 14, 2025 17:49
ffmcgee725
ffmcgee725 previously approved these changes May 15, 2025
Copy link
Member

@ffmcgee725 ffmcgee725 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants