-
Notifications
You must be signed in to change notification settings - Fork 637
feat!: Use StorageService to store source code
#3777
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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| const { result } = await this.messenger.call( | ||
| 'StorageService:getItem', | ||
| this.name, | ||
| snapId, | ||
| ); |
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.
In case we want to add other properties in the future, should this be an object containing sourceCode?
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.
I thought about this and it's in my list of improvements. I wanted to validate the approach first :)
| * @returns The source code for the snap. | ||
| */ | ||
| async #getSourceCode(snapId: SnapId) { | ||
| const { result } = await this.messenger.call( |
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.
Can the usage of the StorageService throw?
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.
not for getItem
57095fe to
6a20e47
Compare
[WORK IN PROGRESS]
This PR adds the use of
StorageServiceto store the Snap source codes. Due to this storage being async, theSnapControllerinitialization is now async and the preinstalled snaps setup now lives ininit()