mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +00:00
commit
e43aaa765f
5 changed files with 20 additions and 5 deletions
|
@ -1 +1 @@
|
|||
Subproject commit b1e0b20621be3ebb280ab3e3de10afe0c11db073
|
||||
Subproject commit 265d83e1adb3ca161e700214a9353bc044d16557
|
|
@ -83,10 +83,10 @@ class CachedElectrumX {
|
|||
// update set with new data
|
||||
if (newSet["setHash"] != "" && set["setHash"] != newSet["setHash"]) {
|
||||
set["setHash"] = !isHexadecimal(newSet["setHash"] as String)
|
||||
? base64ToReverseHex(newSet["setHash"] as String)
|
||||
? base64ToHex(newSet["setHash"] as String)
|
||||
: newSet["setHash"];
|
||||
set["blockHash"] = !isHexadecimal(newSet["blockHash"] as String)
|
||||
? base64ToHex(newSet["blockHash"] as String)
|
||||
? base64ToReverseHex(newSet["blockHash"] as String)
|
||||
: newSet["blockHash"];
|
||||
for (int i = (newSet["coins"] as List).length - 1; i >= 0; i--) {
|
||||
dynamic newCoin = newSet["coins"][i];
|
||||
|
|
|
@ -164,7 +164,7 @@ class _WalletSummaryInfoState extends State<WalletSummaryInfo> {
|
|||
const Spacer(),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
child: SelectableText(
|
||||
"${Format.localizedStringAsFixed(
|
||||
value: balanceToShow,
|
||||
locale: locale,
|
||||
|
|
|
@ -38,7 +38,7 @@ abstract class Constants {
|
|||
// Enable Logger.print statements
|
||||
static const bool disableLogger = false;
|
||||
|
||||
static const int currentHiveDbVersion = 3;
|
||||
static const int currentHiveDbVersion = 4;
|
||||
|
||||
static int satsPerCoin(Coin coin) {
|
||||
switch (coin) {
|
||||
|
|
|
@ -141,6 +141,7 @@ class DbVersionMigrator {
|
|||
|
||||
// try to continue migrating
|
||||
return await migrate(2, secureStore: secureStore);
|
||||
|
||||
case 2:
|
||||
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
||||
final prefs = Prefs.instance;
|
||||
|
@ -154,6 +155,20 @@ class DbVersionMigrator {
|
|||
boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 3);
|
||||
return await migrate(3, secureStore: secureStore);
|
||||
|
||||
case 3:
|
||||
// clear possible broken firo cache
|
||||
await DB.instance.deleteBoxFromDisk(
|
||||
boxName: DB.instance.boxNameSetCache(coin: Coin.firo));
|
||||
await DB.instance.deleteBoxFromDisk(
|
||||
boxName: DB.instance.boxNameUsedSerialsCache(coin: Coin.firo));
|
||||
|
||||
// update version
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 4);
|
||||
|
||||
// try to continue migrating
|
||||
return await migrate(4, secureStore: secureStore);
|
||||
|
||||
default:
|
||||
// finally return
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue