Updated on 2026-08-14
This commit is contained in:
parent
6f06bed703
commit
4870ce933c
1 changed files with 6 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import com.tangem.core.analytics.models.AnalyticsParam
|
|||
import com.tangem.core.decompose.di.ModelScoped
|
||||
import com.tangem.domain.analytics.CheckIsWalletToppedUpUseCase
|
||||
import com.tangem.domain.analytics.model.WalletBalanceState
|
||||
import com.tangem.domain.models.StatusSource
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.TokenList
|
||||
import com.tangem.domain.tokens.model.TotalFiatBalance
|
||||
|
|
@ -74,7 +75,8 @@ internal class TokenListAnalyticsSender @Inject constructor(
|
|||
when (totalFiatBalance) {
|
||||
is TotalFiatBalance.Loaded -> putAttribute(HAS_ERROR, "No")
|
||||
is TotalFiatBalance.Failed -> putAttribute(HAS_ERROR, "Yes")
|
||||
else -> { /* Intentionally do nothing */ }
|
||||
else -> { /* Intentionally do nothing */
|
||||
}
|
||||
}
|
||||
stop()
|
||||
loadingTraces.remove(userWalletId)
|
||||
|
|
@ -83,7 +85,9 @@ internal class TokenListAnalyticsSender @Inject constructor(
|
|||
}
|
||||
|
||||
private fun isTerminalState(balance: TotalFiatBalance): Boolean {
|
||||
return balance is TotalFiatBalance.Failed || balance is TotalFiatBalance.Loaded
|
||||
val isLoaded = balance is TotalFiatBalance.Loaded &&
|
||||
(balance.source == StatusSource.ACTUAL || balance.source == StatusSource.ONLY_CACHE)
|
||||
return balance is TotalFiatBalance.Failed || isLoaded
|
||||
}
|
||||
|
||||
private fun sendBalanceLoadedEventIfNeeded(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue