Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-25 13:35:18 +04:00
parent a335e8d8f4
commit fa125539b4
7 changed files with 165 additions and 12 deletions

View file

@ -1,5 +1,7 @@
package com.tangem.domain.models.account
import com.tangem.domain.core.lce.Lce
import com.tangem.domain.models.quote.PriceChange
import com.tangem.domain.models.tokenlist.TokenList
import kotlinx.serialization.Serializable
@ -17,12 +19,14 @@ sealed interface AccountStatus {
/**
* Represents the status of a crypto portfolio account
*
* @property account the crypto portfolio account
* @property tokenList the list of tokens associated with the account
* @property account the crypto portfolio account
* @property tokenList the list of tokens associated with the account
* @property priceChangeLce the price change information wrapped in a Lce (Loading, Content, Error) state
*/
@Serializable
data class CryptoPortfolio(
override val account: Account.CryptoPortfolio,
val tokenList: TokenList,
val priceChangeLce: Lce<Unit, PriceChange>,
) : AccountStatus
}

View file

@ -1,7 +1,8 @@
package com.tangem.domain.models.quote
import com.tangem.domain.models.StatusSource
import java.math.BigDecimal
import com.tangem.domain.models.serialization.SerializedBigDecimal
import kotlinx.serialization.Serializable
/**
* Represents the price change of a cryptocurrency asset over a specific time period.
@ -11,7 +12,8 @@ import java.math.BigDecimal
*
[REDACTED_AUTHOR]
*/
@Serializable
data class PriceChange(
val value: BigDecimal,
val value: SerializedBigDecimal,
val source: StatusSource,
)