Updated on 2026-08-14
This commit is contained in:
parent
ef8a13cfaa
commit
2f60ccf3fc
14 changed files with 732 additions and 148 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue