mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
clean up migrate and add possible stuff for upcoming firo functionality
This commit is contained in:
parent
325b901cac
commit
97e2f60c85
1 changed files with 23 additions and 5 deletions
|
@ -107,18 +107,36 @@ class DbVersionMigrator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally update version
|
// update version
|
||||||
await DB.instance.put<dynamic>(
|
await DB.instance.put<dynamic>(
|
||||||
boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 1);
|
boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 1);
|
||||||
|
|
||||||
return;
|
// try to continue migrating
|
||||||
// not needed yet
|
return await migrate(1);
|
||||||
// return migrate(1);
|
|
||||||
|
|
||||||
// case 1:
|
// case 1:
|
||||||
// return migrate(2);
|
// await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||||
|
// final walletsService = WalletsService();
|
||||||
|
// final walletInfoList = await walletsService.walletNames;
|
||||||
|
// for (final walletInfo in walletInfoList.values) {
|
||||||
|
// if (walletInfo.coin == Coin.firo) {
|
||||||
|
// await Hive.openBox<dynamic>(walletInfo.walletId);
|
||||||
|
// await DB.instance.delete<dynamic>(
|
||||||
|
// key: "latest_tx_model", boxName: walletInfo.walletId);
|
||||||
|
// await DB.instance.delete<dynamic>(
|
||||||
|
// key: "latest_lelantus_tx_model", boxName: walletInfo.walletId);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // update version
|
||||||
|
// await DB.instance.put<dynamic>(
|
||||||
|
// boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 2);
|
||||||
|
//
|
||||||
|
// // try to continue migrating
|
||||||
|
// return await migrate(2);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
// finally return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue