migrateWalletRepository and rollbackMigration, which the migration uses.
Migrate from storage adapters
Replace each storage adapter with a repository:
To keep the data that an adapter stored, copy it to the new wallet repository with
migrateWalletRepository. Give it the addresses to copy: boarding addresses in onchain, and Arkade addresses in offchain. The function does nothing if there is no data to migrate or if the migration is already done. It never deletes the old data.
migrateWalletRepository copies wallet data only. Packages that store their own contract data supply their own migration, for example migrateToSwapRepository in @arkade-os/boltz-swap.
IndexedDB schema upgrade
Next Steps
- Storage Repositories - Choose where the wallet stores its data