-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Feat/add app metadata controller #5325
base: main
Are you sure you want to change the base?
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.
I see that this controller has no public method, how do we intend the client to interact with this package?
I just realized that the extension is already using the package via the constructor alone, which I feel is a little weird, but I guess goes beyond the scope of this PR
@@ -0,0 +1,73 @@ | |||
{ | |||
"name": "@metamask/app-metadata-controller", | |||
"version": "1.0.0", |
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 we set the version to 0.0.0
until the first release?
"version": "1.0.0", | |
"version": "0.0.0", |
"@metamask/base-controller": "^8.0.0", | ||
"@metamask/rpc-errors": "^7.0.2", | ||
"@metamask/utils": "^11.1.0", | ||
"nanoid": "^3.3.8" |
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.
Are these dependencies used?
"@metamask/base-controller": "^8.0.0", | |
"@metamask/rpc-errors": "^7.0.2", | |
"@metamask/utils": "^11.1.0", | |
"nanoid": "^3.3.8" | |
"@metamask/base-controller": "^8.0.0" |
/** | ||
* Updates the currentAppVersion in state, and sets the previousAppVersion to the old currentAppVersion. | ||
* | ||
* @param maybeNewAppVersion | ||
*/ |
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.
nit: Perhaps we can specify what maybe means in the jsdoc:
/** | |
* Updates the currentAppVersion in state, and sets the previousAppVersion to the old currentAppVersion. | |
* | |
* @param maybeNewAppVersion | |
*/ | |
/** | |
* Update `currentAppVersion` in the controller state if the provided value | |
* is different from the current one. When the value is updated, the previous | |
* value is stored in `previousAppVersion`. | |
* | |
* @param maybeNewAppVersion - The new app version to set. | |
*/ |
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 see that these were simply moved from the extension, but this suggestion will fix the failing CI (or at least part of it)
/** | ||
* Updates the migrationVersion in state. | ||
* | ||
* @param maybeNewMigrationVersion | ||
*/ |
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.
nit: similarly to the other function:
/** | |
* Updates the migrationVersion in state. | |
* | |
* @param maybeNewMigrationVersion | |
*/ | |
/** | |
* Update `currentMigrationVersion` in the controller state if the provided value | |
* is different from the current one. When the value is updated, the previous | |
* value is stored in `previousMigrationVersion`. | |
* | |
* @param maybeNewMigrationVersion - The new migration version to set. | |
*/ |
Could we add a root // src/index.ts
export * from './AppMetadataController` |
We should also add these changes to configuration files:
Also, |
Explanation
Porting over the AppMetadataController from Extension
References
Changelog
@metamask/package-a
@metamask/package-b
Checklist