Skip to content

fix: preserve corrupt seeds.json instead of overwriting on store#3

Merged
kkdao merged 1 commit into
kkdao:optimize/encryption.pyfrom
odudex:optimize/encryption.py
Jun 25, 2026
Merged

fix: preserve corrupt seeds.json instead of overwriting on store#3
kkdao merged 1 commit into
kkdao:optimize/encryption.pyfrom
odudex:optimize/encryption.py

Conversation

@odudex

@odudex odudex commented Jun 23, 2026

Copy link
Copy Markdown

store_encrypted_kef raises StorageCorruptedError and leaves the file untouched when an existing seeds.json is malformed or a non-dict, rather than silently overwriting recoverable data. list_mnemonics returns [] for non-dict storage so corrupt files no longer crash the menu; the UI reports the corruption (English-only) and skips the store.

What is this PR for?

Changes made to:

  • Code
  • Tests
  • Docs
  • CHANGELOG

Did you build the code and tested on device?

  • Yes, built and tested on tzt

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

store_encrypted_kef raises StorageCorruptedError and leaves the file
untouched when an existing seeds.json is malformed or a non-dict, rather
than silently overwriting recoverable data. list_mnemonics returns [] for
non-dict storage so corrupt files no longer crash the menu; the UI reports
the corruption (English-only) and skips the store.
@kkdao

kkdao commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Built and tested on the txt. Corrupt SD seeds.json warns and is preserved. Clean SD stores normally.

@kkdao kkdao merged commit dbbae74 into kkdao:optimize/encryption.py Jun 25, 2026
10 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.

2 participants