diff --git a/lib/pages/wallet_view/sub_widgets/transactions_list.dart b/lib/pages/wallet_view/sub_widgets/transactions_list.dart index bdfd00394..45d446d2b 100644 --- a/lib/pages/wallet_view/sub_widgets/transactions_list.dart +++ b/lib/pages/wallet_view/sub_widgets/transactions_list.dart @@ -94,7 +94,10 @@ class _TransactionsListState extends ConsumerState { TransactionCard( // this may mess with combined firo transactions key: isConfirmed - ? Key(tx.txid + tx.type.name + tx.address.value.toString()) + ? Key(tx.txid + + tx.type.name + + tx.address.value.toString() + + tx.height.toString()) : UniqueKey(), // transaction: tx, walletId: widget.walletId, @@ -191,7 +194,10 @@ class _TransactionsListState extends ConsumerState { child: TransactionCard( // this may mess with combined firo transactions key: isConfirmed - ? Key(tx.txid + tx.type.name + tx.address.value.toString()) + ? Key(tx.txid + + tx.type.name + + tx.address.value.toString() + + tx.height.toString()) : UniqueKey(), transaction: tx, walletId: widget.walletId, diff --git a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart index 01a9a69e1..fbaba46ca 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -112,10 +112,11 @@ class _TransactionDetailsViewState super.dispose(); } - String whatIsIt(TransactionType type, int height) { + String whatIsIt(Transaction tx, int height) { + final type = tx.type; if (coin == Coin.firo || coin == Coin.firoTestNet) { - if (_transaction.subType == TransactionSubType.mint) { - if (_transaction.isConfirmed(height, coin.requiredConfirmations)) { + if (tx.subType == TransactionSubType.mint) { + if (tx.isConfirmed(height, coin.requiredConfirmations)) { return "Minted"; } else { return "Minting"; @@ -127,13 +128,13 @@ class _TransactionDetailsViewState // if (_transaction.isMinting) { // return "Minting"; // } else - if (_transaction.isConfirmed(height, coin.requiredConfirmations)) { + if (tx.isConfirmed(height, coin.requiredConfirmations)) { return "Received"; } else { return "Receiving"; } } else if (type == TransactionType.outgoing) { - if (_transaction.isConfirmed(height, coin.requiredConfirmations)) { + if (tx.isConfirmed(height, coin.requiredConfirmations)) { return "Sent"; } else { return "Sending"; @@ -428,7 +429,7 @@ class _TransactionDetailsViewState _transaction.isCancelled ? "Cancelled" : whatIsIt( - _transaction.type, + _transaction, currentHeight, ), style: @@ -545,7 +546,7 @@ class _TransactionDetailsViewState _transaction.isCancelled ? "Cancelled" : whatIsIt( - _transaction.type, + _transaction, currentHeight, ), style: isDesktop diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index e108352b4..516af2f34 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -1958,7 +1958,8 @@ class BitcoinCashWallet extends CoinServiceAPI if (storedTx == null || storedTx.address.value == null || - storedTx.height == null + storedTx.height == null || + (storedTx.height != null && storedTx.height! <= 0) // zero conf messes this up // !storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS) ) {