fix(wallet): restore scans all keysets including inactive#1753
Merged
thesimplekid merged 6 commits intocashubtc:mainfrom Mar 23, 2026
Merged
fix(wallet): restore scans all keysets including inactive#1753thesimplekid merged 6 commits intocashubtc:mainfrom
thesimplekid merged 6 commits intocashubtc:mainfrom
Conversation
lescuer97
reviewed
Mar 20, 2026
…_all_mint_keysets() method
lescuer97
reviewed
Mar 20, 2026
Collaborator
thesimplekid
left a comment
There was a problem hiding this comment.
Ideally we could add a tests that uses the fake mints rotate keyset to ensure we can restore both inactive and active.
thesimplekid
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
restore() in wallet/mod.rs only scanned active keysets via load_mint_keysets(). If a mint has rotated keysets, proofs signed with the old (now inactive) keyset were never found during restore.
Added get_all_mint_keysets() which returns all keysets for the wallet's unit regardless of active status, and updated restore() to use it.
Closes #1752
Notes to the reviewers
The fix is minimal a new method get_all_mint_keysets() in keysets.rs that drops the keyset.active filter, and a one-line change in restore() to call it. The active filter remains correct for all other operations (mint, swap, melt) where you want the current keyset. - cdk: restore() now scans inactive keysets so proofs from rotated keysets are recovered
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committing