Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AuroraHuang22
Copy link
Contributor

No description provided.

Copy link

AuroraHuang22 added a commit that referenced this pull request Feb 5, 2025
Copy link
Member

@williamchong williamchong left a 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?

Comment on lines +134 to +145
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 })
Copy link
Member

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

AuroraHuang22 added a commit that referenced this pull request Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants