Updated on 2026-08-14
This commit is contained in:
parent
4d63ce02f1
commit
ca46cb41a6
1 changed files with 9 additions and 9 deletions
|
|
@ -12,7 +12,6 @@ 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
|
||||
|
|
@ -27,14 +26,15 @@ 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
|
||||
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()
|
||||
}
|
||||
// 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()
|
||||
// }
|
||||
return status.pendingTransactions.isEmpty()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue