-
Notifications
You must be signed in to change notification settings - Fork 5k
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
refactor: Refactor initialisation of Snaps controllers #30034
base: main
Are you sure you want to change the base?
Conversation
`SnapController`'s name was set to `string` rather than `"SnapController"`, which causes some problems with type inference in MetaMask/metamask-extension#30034.
56cf332
to
1dcd71a
Compare
.yarn/patches/@metamask-snaps-controllers-npm-9.18.0-bdb7548ef5.patch
Outdated
Show resolved
Hide resolved
Builds ready [bcd2967]
Page Load Metrics (1840 ± 92 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [3cfc768]
Page Load Metrics (1739 ± 61 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
3cfc768
to
430f2e8
Compare
test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json
Outdated
Show resolved
Hide resolved
SnapInsightsControllerMessenger | ||
> = ({ controllerMessenger, persistedState }) => { | ||
const controller = new SnapInsightsController({ | ||
// @ts-expect-error: `persistedState.SnapInsightsController` is not |
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.
Somewhat worrying that all of these types don't match, any ideas why?
Builds ready [b068d1d]
Page Load Metrics (1546 ± 43 ms)
|
6699f5f
to
35fe54f
Compare
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
35fe54f
to
5ae3d12
Compare
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
55bbf3d
to
11d0475
Compare
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
lavamoat/browserify/main/policy.json
Outdated
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 changes are expected, as bumping @metamask/rate-limit-controller
made it possible to dedupe some versions. It does not add any new capabilities to @metamask/rate-limit-controller
.
8c3471b
to
24deb57
Compare
24deb57
to
5a9ea5a
Compare
Description
This refactors the initialisation of Snaps-related controllers to follow the pattern introduced in #28948.
Related issues
Closes #30032.
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist