-
Notifications
You must be signed in to change notification settings - Fork 3
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
[TAS-3096] 🚸 Avoid forcing signer storage on every session restore #276
base: master
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.
Have we checked we would already check for offlineSigner
exists, and call initWallet
for everywhere we need a signer? Do we have such a computed state (signer exists) in store that we are always checking?
const accountsValue = connection?.accounts || [] | ||
const signerValue = connection?.offlineSigner || undefined | ||
const methodValue = connection?.method || undefined | ||
|
||
if (accountsValue && accountsValue.length > 0) { | ||
accounts.value = accountsValue | ||
} | ||
if (signerValue) { | ||
signer.value = signerValue as (OfflineAminoSigner & OfflineDirectSigner) | ||
} | ||
if (methodValue) { | ||
useTrackEvent('login', { method: methodValue }) |
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.
If only offlineSigner
could be empty, don't allow other params to be optional if there is not such use case? Same for the crisp calls below
No description provided.