-
-
Notifications
You must be signed in to change notification settings - Fork 134
Add types for store and fix type discrepancies #247
Conversation
8b29513
to
bdea599
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: obs-store@4.0.3 |
👍 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. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
bdea599
to
71c792b
Compare
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.
Looks great! Let me know when the description is ready so that I can review the list of changes. Lots of changes here.
I spotted a few more type errors caused by the |
These are our packages |
The description should now be ready, I hope I mentioned everything 😄 |
I have created a few extra PRs for the problems I found related to |
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.
Did a quick pass on this and had a couple of suggestions/questions. Will do another pass tomorrow to make sure I understand how these types are changing.
da16875
to
c4d087a
Compare
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
c4d087a
to
f2b241d
Compare
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.
LGTM! Description of changes looks great too
Description
This PR updates
obs-store
to@metamask/obs-store
and fixes some type discrepancies with the actual statesChanges
KeyringControllerArgs
properties types changedkeyringBuilders
, now is an optional{ (): Keyring<Json>; type: string }[]
initState
now accepts only an optional persistent state, of typeKeyringControllerPersistentState
store
andmemStore
public properties changedKeyringController.store
is now anObservableStore<KeyringControllerPersistentState>
KeyringController.memStore
is now anObservableStore<KeyringControllerState>
updateMemStoreKeyrings
method return type changed toPromise<void>
KeyringControllerState
type changed to include only non-persistent state:undefined
is used instead ofnull
whenencryptionKey
andencryptionSalt
are unsetkeyrings
is now of typeKeyringObject[]
instead ofKeyring<Json>
password
,store
,memStore
have been removed - note that in practice this change only affects typescreateNewVaultAndKeychain
createNewVaultAndRestore
setLocked
submitPassword
submitEncryptionKey
addNewAccount
removeAccount
fullUpdate
KeyringControllerPersistentState
type which includes only persistent state, an optional string property with keyvault
KeyringObject
type for how keyrings are represented inmemStore
References
Checklist