From a2d6823ee9106ffe2b5ac5c26996d5ab7fceeb6e Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 14 Dec 2022 09:05:47 -0600 Subject: [PATCH 1/4] firo anon set decoding bugfix --- lib/electrumx_rpc/cached_electrumx.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/electrumx_rpc/cached_electrumx.dart b/lib/electrumx_rpc/cached_electrumx.dart index f62e7e4f5..e7d815eab 100644 --- a/lib/electrumx_rpc/cached_electrumx.dart +++ b/lib/electrumx_rpc/cached_electrumx.dart @@ -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]; From cf82374a0cb510ffc2ad2c834eecdcbc8c8f2f3c Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 14 Dec 2022 09:11:24 -0600 Subject: [PATCH 2/4] selectable balance text --- lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart index 0d6ddd305..d38e17a6a 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart @@ -164,7 +164,7 @@ class _WalletSummaryInfoState extends State { const Spacer(), FittedBox( fit: BoxFit.scaleDown, - child: Text( + child: SelectableText( "${Format.localizedStringAsFixed( value: balanceToShow, locale: locale, From c84ae8ff21d5a838753925843c6959c1981a0114 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 14 Dec 2022 10:26:48 -0600 Subject: [PATCH 3/4] db migrate to force firo cache clear --- lib/utilities/constants.dart | 2 +- lib/utilities/db_version_migration.dart | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index c6fe81d74..740e40c24 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -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) { diff --git a/lib/utilities/db_version_migration.dart b/lib/utilities/db_version_migration.dart index ae5190fc4..1320fab25 100644 --- a/lib/utilities/db_version_migration.dart +++ b/lib/utilities/db_version_migration.dart @@ -141,6 +141,7 @@ class DbVersionMigrator { // try to continue migrating return await migrate(2, secureStore: secureStore); + case 2: await Hive.openBox(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( + boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 4); + + // try to continue migrating + return await migrate(4, secureStore: secureStore); + default: // finally return return; From 5d025f90806d8712eb87d432bfc4c29ec381dc54 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 14 Dec 2022 10:51:08 -0600 Subject: [PATCH 4/4] update liblelantus commit --- crypto_plugins/flutter_liblelantus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus index b1e0b2062..265d83e1a 160000 --- a/crypto_plugins/flutter_liblelantus +++ b/crypto_plugins/flutter_liblelantus @@ -1 +1 @@ -Subproject commit b1e0b20621be3ebb280ab3e3de10afe0c11db073 +Subproject commit 265d83e1adb3ca161e700214a9353bc044d16557