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

wallet-ext: keyring fix locking and reviving race condition #6848

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

pchrysochoidis
Copy link
Contributor

@pchrysochoidis pchrysochoidis commented Dec 16, 2022

  • when it's time to lock the keyring due to inactivity there is a race condition between reviving from session storage and locking because of the alarm. (Keyring is trying to revive since bg service wakes up to respond to the alarm and before completing we lock it)
  • this fixes it by waiting reviving to complete before locking
  • this only happens if bg service was inactive before the alarm was triggered

closes: APPS-302

* when it's time to lock the keyring due to inactivity there is a race condition between reviving from session storage and locking because of the alarm. (Keyring is trying to revive since bg service wakes up to respond to the alarm and before completing we lock it)
* this fixes it by waiting reviving to complete before locking
* this only happens if bg service was inactive before the alarm was triggered
@vercel
Copy link

vercel bot commented Dec 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
wallet-adapter ⬜️ Ignored (Inspect) Dec 16, 2022 at 0:31AM (UTC)

@github-actions
Copy link
Contributor

💳 Wallet Extension has been built, you can download the packaged extension here: https://github.com/MystenLabs/sui/actions/runs/3709140308#artifacts

@pchrysochoidis pchrysochoidis merged commit 64de411 into main Dec 16, 2022
@pchrysochoidis pchrysochoidis deleted the pc-wallet-ext-keyring-fix-lock-revive-race branch December 16, 2022 10:49
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