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

fix vault key changes not seen by all instances of useVault #1546

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

huumn
Copy link
Member

@huumn huumn commented Nov 5, 2024

fix #1543

Description

This problem was caused by only one useVaultConfigurator receiving the new key when a device is connected. I had been assuming the useEffect would capture this update on connect - but it doesn't because me.privates.vaultKeyHash changes before the device is connected.

This adds apollo's reactiveVar to create a global var holding the vault key now so that if one instance changes it, all instances change.

Bonus

I made it so that if the local key hash doesn't match, we unsync any local wallets to local storage.

@huumn huumn merged commit 4ad93cd into master Nov 6, 2024
6 checks passed
@huumn huumn deleted the fix-1543 branch November 6, 2024 01:45
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.

Device sync requires manual refresh for sync'd creds to show
1 participant