This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 134
Call persistAllKeyrings
in setLocked
?
#130
Comments
alex-miller-0
added a commit
to GridPlus/eth-lattice-keyring
that referenced
this issue
Mar 19, 2022
Unless MetaMask caches state at lock time, this actually slows down the initialization process... MetaMask/KeyringController#130
5 tasks
alex-miller-0
added a commit
to GridPlus/eth-lattice-keyring
that referenced
this issue
Mar 19, 2022
Unless MetaMask caches state at lock time, this actually slows down the initialization process... MetaMask/KeyringController#130
alex-miller-0
added a commit
to GridPlus/eth-lattice-keyring
that referenced
this issue
Mar 19, 2022
Unless MetaMask caches state at lock time, this actually slows down the initialization process... MetaMask/KeyringController#130
alex-miller-0
added a commit
to GridPlus/eth-lattice-keyring
that referenced
this issue
Mar 19, 2022
Unless MetaMask caches state at lock time, this actually slows down the initialization process... MetaMask/KeyringController#130
alex-miller-0
added a commit
to GridPlus/eth-lattice-keyring
that referenced
this issue
Mar 19, 2022
Unless MetaMask caches state at lock time, this actually slows down the initialization process... MetaMask/KeyringController#130
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
GridPlus' keyring recently added a state caching mechanism under a mistaken assumption that
serialize
would be called when the MetaMask extension locked. Since the Lattice is an internet-connected device with its own state, we would normally need to asynchronously connect to the device in order to sync state, which takes 2-4 seconds, depending on internet connection. With the latest changes, we can now dry state and rehydrate a connection without having to do any asynchronous calls.However, this is dependent on they keyring controller persisting keyring state or else every time the extension locks, we will lose our most recent state data and we will need to asynchronously reconnect with a retry mechanism (which is actually slower than initially forcing asynchronous resync like we were doing before, since it adds another call that ends up failing and forcing the resync). This would not be an issue if
setLocked
calledpersistAllKeyrings
to save state.Is there any reason you do not call
persistAllKeyrings
insetLocked
? And if the answer is no, would you be open to adding that serialization hook?The text was updated successfully, but these errors were encountered: