-
Notifications
You must be signed in to change notification settings - Fork 560
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
[BREAKING] Move endowments from Controllers to RPC methods #2155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark this as breaking!
236178f
to
d2e674d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2155 +/- ##
=========================================
+ Coverage 0 96.68% +96.68%
=========================================
Files 0 324 +324
Lines 0 7305 +7305
Branches 0 1129 +1129
=========================================
+ Hits 0 7063 +7063
- Misses 0 242 +242 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
46add89
to
abac6ce
Compare
Adjust coverage thresholds because of the moved files Adjust coverage thresholds in Controllers
2227845
to
c6e35b5
Compare
This PR is a BREAKING change because certain elements are moved from one package to another and import across the libraries is affected.
Summary of changes
All endowment related functionalities and specifications are moved from the
endowments
folder withinsnaps-controllers
to theendowments
folder located undersnaps-rpc-methods
package and exported from there.Export of certain functions from endowments required adjustments to the index files, so these changes are made as well.
Fixed are related imports of the endowments in another packages affected (e.g. snaps-simulator).
Code coverage thresholds are adjusted to the new calculations since there are no functional or logical changes.
Reasons for the changes
New features being implemented require endowment related specifications and functionalities, in different packages.
The example of this is Dynamic Permissions feature which require processing of the raw permission specification in order to request permission grant to the Permission Controller. This process requires specific utility functions as well as the caveat mappers or related specifications which cannot be imported from
snaps-controllers
package directly into thesnaps-rpc-methods
package.The best solution for now is to move the endowment related code to the
snaps-rpc-methods
package and export it from there.