mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Extracted the complex parsing, validation, and migration logic for saved profiles into a new helper function `processSavedProfilesPayload`. This reduces the complexity of `loadSavedProfilesFromStorage` and improves readability. Functionality is preserved, including handling of legacy formats, NIP-07 auth types, and active profile normalization. Verified with targeted tests: - tests/state/cache-saved-profiles.test.mjs - tests/state/cache.test.mjs Co-authored-by: PR0M3TH3AN <[email protected]>