Skip to content

fix(migrations): harden legacy Redux bootstrap and add fixture generator#184

Merged
Kelbie merged 4 commits intomainfrom
fix/routstr-migration-gating
Mar 8, 2026
Merged

fix(migrations): harden legacy Redux bootstrap and add fixture generator#184
Kelbie merged 4 commits intomainfrom
fix/routstr-migration-gating

Conversation

@Kelbie
Copy link
Contributor

@Kelbie Kelbie commented Mar 8, 2026

Summary

  • harden the legacy Redux bootstrap and migration gating flow so old Redux data is reconstructed before the app enters the new profile-scoped storage path
  • add explicit global and legacy migration steps for profile/bootstrap state, plus supporting debug visibility around persisted storage
  • add a legacy Sovran account generator script that reconstructs deprecated Redux fixture data from a mnemonic and Cashu tokens using real mint keysets/keys fetched through cashu-ts

Test plan

  • Run node/tsx against scripts/gen-og-sovran-account.ts with new and one or more Cashu tokens
  • Launch the app with generated legacy fixture data and confirm legacy Redux bootstrap runs successfully
  • Verify nostr profile bootstrap, mnemonic secure-storage bootstrap, and cashu migration complete without regressions
  • Verify profile-scoped storage migration and initialization gates still complete on a clean launch
  • Run project lint/type-check coverage as needed before merge

Made with Cursor

Kelbie added 4 commits March 8, 2026 06:55
Run global storage migrations before profile-scoped stores can hydrate or write so upgraded Routstr and related profile data are copied into pubkey-scoped keys before defaults overwrite them. Restore full storage dump sharing so upgraded state can be inspected and compared during migration validation.

Made-with: Cursor
Run the legacy Redux bootstrap before current storage migrations so old installs populate SecureStore, profile metadata, and Coco state before profile-scoped Zustand stores hydrate. Remove provider-level fallback migration logic now that startup explicitly sequences legacy bootstrap ahead of pubkey-keyed storage access.

Made-with: Cursor
Add a reusable script to generate legacy Sovran Redux fixtures from a mnemonic and cashu tokens, and keep the deprecated reducers aligned with the historical persisted state shape so migration testing is reproducible without committing wallet-specific data.

Made-with: Cursor
Load mint keysets and keys from each mint via cashu-ts so the generated Redux fixture matches historical persisted data more closely, and drop the extra JS entrypoint now that the TypeScript generator is the only supported path.

Made-with: Cursor
@Kelbie Kelbie merged commit 7056ecc into main Mar 8, 2026
1 check failed
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.

1 participant