Repository navigation
Milestone
Description
Part of #998.
Blocked by synonymdev/bitkit-core#113. Also depends on the final activity model shape from synonymdev/bitkit-core#112.
Scope
Update the app's backup/restore flow after Core exposes wallet-scoped activity migration/export APIs.
Current app state:
ActivityBackupV1stores Core-ownedactivities: List<Activity>,activityTags: List<ActivityTags>, andclosedChannels: List<ClosedChannelDetails>.MetadataBackupV1stores Core-ownedtagMetadata: List<PreActivityMetadata>alongside app-owned cache/pubky data.BackupRepocurrently decodes those payloads directly into generated Core models before Core can migrate legacy activity JSON.- Core owns the activity data and activity DB. The app owns the VSS envelope, backup scheduling, and backup status.
Required app changes
After synonymdev/bitkit-core#113 lands:
- Read the
ACTIVITYandMETADATAVSS backup envelopes without decoding Core-owned fields into generated Core models first. - Pass raw Core-owned activity/tag/pre-activity metadata JSON to Core migration/import APIs.
- Keep app-owned restore work in the app, including cache, pubky session, settings, widgets, wallet records, and backup status handling.
- Ask Core for migrated/current Core-owned backup entries after migration/import.
- Rewrite the app-owned VSS backup envelopes with those migrated/current Core entries so the next restore no longer depends on legacy model JSON.
- Do not add app-owned v1/v2
walletIdmigration semantics for Core models.
Acceptance criteria
- A legacy activity backup whose Core activity/tag/metadata entries are missing
walletIdrestores through Core migration without app-side JSON patching. - The app rewrites the
ACTIVITYand affectedMETADATAVSS backups with migrated/current Core entries after migration. - Future restores decode the rewritten VSS backups without requiring the legacy migration path.
- Existing non-default wallet ids returned by Core are preserved in rewritten backups.
- Tests cover legacy
ActivityBackupV1andMetadataBackupV1restore input, the Core migration/import call boundary, and VSS backup rewrite behavior.
Activity
[-]Backup/restore for Core activity migrations[/-][+]Hardware Wallet Data Backup & Restore[/+]