From 95b9e6170fcd4636c1708410acd86ded3bdd7b52 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 19 Jan 2023 09:16:30 -0600 Subject: [PATCH] firo mint tx migrate fix --- lib/services/coins/firo/firo_wallet.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index 259420ac2..df777a63c 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -2864,7 +2864,14 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { List, isar_models.Address?>> txnsData = []; for (final value in data.values) { - final transactionAddress = value.item1!; + // allow possible null address on mints as we don't display address + // this should normally never be null anyways but old (dbVersion up to 4) + // migrated transactions may not have had an address (full rescan should + // fix this) + final transactionAddress = + value.item2.subType == isar_models.TransactionSubType.mint + ? value.item1 + : value.item1!; final outs = value.item2.outputs.where((_) => true).toList(growable: false); final ins = value.item2.inputs.where((_) => true).toList(growable: false);