From 0f27f563ef453bfd05da9b378e482517e1ae1131 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 10 Jul 2023 18:55:36 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../wallet/ui/utils/WalletDataOperations.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/features/wallet/ui/utils/WalletDataOperations.kt b/app/src/main/java/com/tangem/tap/features/wallet/ui/utils/WalletDataOperations.kt index 4f9f9d5453..3f72a34acb 100644 --- a/app/src/main/java/com/tangem/tap/features/wallet/ui/utils/WalletDataOperations.kt +++ b/app/src/main/java/com/tangem/tap/features/wallet/ui/utils/WalletDataOperations.kt @@ -12,6 +12,7 @@ import com.tangem.tap.common.extensions.toFormattedCurrencyString import com.tangem.tap.common.extensions.toFormattedFiatValue import com.tangem.tap.domain.model.WalletDataModel import com.tangem.tap.domain.model.WalletStoreModel +import com.tangem.tap.features.wallet.models.PendingTransactionType import com.tangem.tap.features.wallet.models.WalletWarning import com.tangem.tap.features.wallet.redux.WalletMainButton import com.tangem.tap.features.wallet.redux.utils.UNKNOWN_AMOUNT_SIGN @@ -26,15 +27,14 @@ internal fun WalletDataModel.mainButton(blockchainAmount: BigDecimal): WalletMai internal fun WalletDataModel.hasPendingTransactions(): Boolean { // for now check pending ongoing only just for BTC, later test and add other utxo networks - // disabled for release 4.8, test and enable in 4.9 - // val isBitcoinBlockchain = - // currency.blockchain == Blockchain.Bitcoin || currency.blockchain == Blockchain.BitcoinTestnet - // if (currency.isBlockchain() && isBitcoinBlockchain) { - // val outgoingTransactions = status.pendingTransactions.filter { - // it.type == PendingTransactionType.Outgoing - // } - // return outgoingTransactions.isEmpty() - // } + val isBitcoinBlockchain = + currency.blockchain == Blockchain.Bitcoin || currency.blockchain == Blockchain.BitcoinTestnet + if (currency.isBlockchain() && isBitcoinBlockchain) { + val outgoingTransactions = status.pendingTransactions.filter { + it.type == PendingTransactionType.Outgoing + } + return outgoingTransactions.isEmpty() + } return status.pendingTransactions.isEmpty() }