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: store watch-only wallet correctly when change_password() is called [RELEASE] #8999

Conversation

jeffro256
Copy link
Contributor

The Monero GUI code was calling Monero::wallet::setPassword() on every open/close for some reason, and the old store_to() code called store_keys() with watch_only=false, even for watch-only wallets. This caused a bug where the watch-only keys file got saved with with the JSON field watch_only set to 0, and after saving a watch-only wallet once, a user could never open it back up against because load() errored out. This never got brought up before this because you would have to change the file location of the watch-only wallet to see this bug, and I guess that didn't happen often, but calling the new store_to() function with the new force_rewrite parameter set to true triggers key restoring and the bug appeared.

… called

The Monero GUI code was calling `Monero::wallet::setPassword()` on every open/close for some reason,
and the old `store_to()` code called `store_keys()` with `watch_only=false`, even for watch-only wallets.
This caused a bug where the watch-only keys file got saved with with the JSON field `watch_only` set to 0,
and after saving a watch-only wallet once, a user could never open it back up against because `load()` errored out.
This never got brought up before this because you would have to change the file location of the watch-only
wallet to see this bug, and I guess that didn't happen often, but calling the new `store_to()` function with the
new `force_rewrite` parameter set to `true` triggers key restoring and the bug appeared.
@luigi1111 luigi1111 merged commit 41157db into monero-project:release-v0.18 Sep 30, 2023
17 checks passed
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.

None yet

3 participants