Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-24 17:21:35 +03:00
commit b2da68216a
501 changed files with 16767 additions and 5720 deletions

View file

@ -14,6 +14,7 @@ import com.tangem.domain.models.wallet.UserWallet
import com.tangem.domain.tokens.model.analytics.TokenExchangeAnalyticsEvent
import com.tangem.domain.tokens.model.analytics.TokenOnrampAnalyticsEvent
import com.tangem.domain.tokens.model.analytics.TokenScreenAnalyticsEvent
import com.tangem.domain.txhistory.TxHistoryFeatureToggles
import com.tangem.feature.swap.domain.models.domain.ExchangeStatus
import com.tangem.feature.tokendetails.presentation.tokendetails.model.ExpressTransactionsClickIntents
import com.tangem.feature.tokendetails.presentation.tokendetails.state.components.ExchangeStatusNotification
@ -47,6 +48,7 @@ internal class ExpressStatusFactory @AssistedInject constructor(
onrampStatusFactory: OnrampStatusFactory.Factory,
exchangeStatusFactory: ExchangeStatusFactory.Factory,
private val swapFeatureToggles: SwapFeatureToggles,
private val txHistoryFeatureToggles: TxHistoryFeatureToggles,
) {
private val exchangeStatusFactory by lazy(mode = LazyThreadSafetyMode.NONE) {
@ -106,12 +108,17 @@ internal class ExpressStatusFactory @AssistedInject constructor(
if (currentTx is ExchangeUM && currentTx.activeStatus == ExchangeStatus.Finished) {
updateBalance(currentTx.toCryptoCurrency)
}
val expressTxsToDisplay = expressTxs.filterNot {
when (it) {
is ExpressTransactionStateUM.OnrampUM -> it.activeStatus.isHidden
else -> false
}
}.toPersistentList()
val expressTxsToDisplay = if (txHistoryFeatureToggles.isNewTxHistoryEnabled) {
persistentListOf()
} else {
expressTxs.filterNot {
when (it) {
is ExpressTransactionStateUM.OnrampUM -> it.activeStatus.isHidden
else -> false
}
}.toPersistentList()
}
return state.copy(
transactions = expressTxs,
transactionsToDisplay = expressTxsToDisplay,

View file

@ -22,7 +22,7 @@ import com.tangem.domain.models.wallet.UserWalletId
import com.tangem.domain.models.wallet.isLocked
import com.tangem.domain.models.wallet.isMultiCurrency
import com.tangem.domain.tokens.wallet.WalletBalanceFetcher
import com.tangem.domain.wallets.models.GetUserWalletError
import com.tangem.domain.wallets.models.errors.GetUserWalletError
import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase
import com.tangem.domain.wallets.usecase.GetUserWalletUseCase
import com.tangem.domain.wallets.usecase.SelectWalletUseCase