feat!: Use StorageService to store source code#3777
Merged
GuillaumeRx merged 22 commits intomainfrom Feb 3, 2026
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Mrtenz
reviewed
Dec 16, 2025
57095fe to
6a20e47
Compare
202b635 to
801cc12
Compare
655f32e to
85b792f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3777 +/- ##
=======================================
Coverage 98.46% 98.47%
=======================================
Files 429 429
Lines 12399 12421 +22
Branches 1923 1924 +1
=======================================
+ Hits 12209 12231 +22
Misses 190 190 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
85b792f to
e3515be
Compare
Mrtenz
previously requested changes
Jan 21, 2026
b5235de to
31b6881
Compare
df10375 to
197f300
Compare
dec6422 to
bbdbabf
Compare
FrederikBolding
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the use of
StorageServiceto store the Snap source codes.Changes
SnapController:sourceCodefrom controller's statesourceCodetoStorageServiceStorageServicecontrollerSetuppromise that resolves when the controller has finished initializationinit()async and handle the pre-installed snaps setup insideSnapControllertests and test utils:PermissionController:hasPermissiontofalsein order to avoid trying to call lifecycle hooks and throwing an error when callinginit. This is due to the fact thatPermissionController:hasPermissionwould returntruebutPermissionController:getPermissionswould not return the correct handler endowment.getSnapControllerto an asynchronous function that callsinit()and wait for it to finish. That makes sure we don't have any race conditions or side effects when instantiating a controller in the tests.StorageServiceinsidegetSnapController()to hydrate the storage service with the relevant snap source codegetSnapControllerOptions()take therootMessengerin its parameter to allow the creation of theStorageService. That means that in the tests we now retrieve theSnapController's messenger fromgetSnapControllerOptions()Note
Low Risk
Low risk dependency-only change; runtime behavior is unchanged unless downstream code begins importing or relying on
@metamask/storage-service.Overview
Adds
@metamask/storage-serviceas a new dependency of@metamask/snaps-controllersviapackage.json, enabling the package to compile/link against the storage service library.Written by Cursor Bugbot for commit fdb0378. This will update automatically on new commits. Configure here.