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 77decdfcb..056b8da4b 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -968,17 +968,25 @@ class _TransactionDetailsViewState ? const EdgeInsets.all(16) : const EdgeInsets.all(12), child: Builder(builder: (context) { - final height = widget.coin != Coin.epicCash && - _transaction.isConfirmed( - currentHeight, - coin.requiredConfirmations, - ) - ? "${_transaction.height == 0 ? "Unknown" : _transaction.height}" - : _transaction.getConfirmations( - currentHeight) > - 0 - ? "${_transaction.height}" - : "Pending"; + final String height; + + if (widget.coin == Coin.bitcoincash || + widget.coin == Coin.bitcoincashTestnet) { + height = + "${_transaction.height != null && _transaction.height! > 0 ? _transaction.height! : "Pending"}"; + } else { + height = widget.coin != Coin.epicCash && + _transaction.isConfirmed( + currentHeight, + coin.requiredConfirmations, + ) + ? "${_transaction.height == 0 ? "Unknown" : _transaction.height}" + : _transaction.getConfirmations( + currentHeight) > + 0 + ? "${_transaction.height}" + : "Pending"; + } return Row( mainAxisAlignment: diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index d954371d7..a6d35e8f8 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -2120,8 +2120,10 @@ class BitcoinCashWallet extends CoinServiceAPI .txidEqualTo(txHash["tx_hash"] as String) .findFirst(); - if (storedTx == null || - !storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS)) { + if (storedTx == null || storedTx.address.value == null + // zero conf messes this up + // !storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS) + ) { final tx = await cachedElectrumXClient.getTransaction( txHash: txHash["tx_hash"] as String, verbose: true,