-
Notifications
You must be signed in to change notification settings - Fork 609
feat: Add new metadata to snaps controllers #3632
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
base: main
Are you sure you want to change the base?
Conversation
The new metadata properties `includeInStateLogs` and `usedInUi` have been added to all snaps controllers. Relates to https://github.com/MetaMask/decisions/blob/main/decisions/core/0014-Expand-Controller-Metadata.md
f027323
to
19b08a7
Compare
@@ -82,40 +82,6 @@ describe('SnapInterfaceController', () => { | |||
}); | |||
}); | |||
|
|||
describe('constructor', () => { | |||
it('persists notification interfaces', () => { |
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.
This was moved below to the metadata
describe block, as it seemed like a better fit there.
@@ -305,80 +309,6 @@ describe('SnapController', () => { | |||
snapController.destroy(); | |||
}); | |||
|
|||
it('can rehydrate state', async () => { |
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.
These tests were moved to the metadata
block as well
`); | ||
}); | ||
|
||
it('strips out large state properties', () => { |
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.
This is a new test I wrote to ensure the new state deriver is working as expected
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3632 +/- ##
=======================================
Coverage 98.28% 98.28%
=======================================
Files 417 417
Lines 11803 11811 +8
Branches 1844 1844
=======================================
+ Hits 11601 11609 +8
Misses 202 202 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Probably need a review from @Mrtenz or @GuillaumeRx, but LGTM at least.
The new metadata properties
includeInStateLogs
andusedInUi
have been added to all snaps controllers.Relates to https://github.com/MetaMask/decisions/blob/main/decisions/core/0014-Expand-Controller-Metadata.md