Commit 8cd698d
committed
fix: migrate legacy backups missing wallet id on restore
Backups written before activity data became wallet-scoped have no wallet id on
their activity, tag and pre-activity-metadata records. With bitkit-core 0.4.0
those records require a wallet id, so decoding such a backup throws before the
records reach Core.
Before decoding a restored envelope, hand each Core-owned array to the matching
bitkit-core migration helper (migrateBackupActivitiesJson,
migrateBackupActivityTagsJson, migrateBackupPreActivityMetadataJson), which
fills in the default wallet id for records that lack one and preserves any
existing id. The app never edits Core model JSON itself, and current backups
that already carry a wallet id are unaffected.
Bumps bitkit-core to 0.4.0.1 parent aea4314 commit 8cd698d
3 files changed
Lines changed: 34 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
| 1204 | + | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| |||
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
227 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
228 | 235 | | |
229 | 236 | | |
230 | 237 | | |
| |||
739 | 746 | | |
740 | 747 | | |
741 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
742 | 771 | | |
743 | 772 | | |
744 | 773 | | |
| |||
0 commit comments