Updated on 2026-08-14
This commit is contained in:
parent
4aa6a9666b
commit
c3bfe301a5
11 changed files with 133 additions and 24 deletions
|
|
@ -2,6 +2,7 @@ package com.tangem.blockchainsdk.models
|
|||
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.network.TxInfo
|
||||
import com.tangem.domain.models.yield.supply.YieldSupplyStatus
|
||||
import java.math.BigDecimal
|
||||
|
||||
/** Result of updating wallet manager */
|
||||
|
|
@ -65,18 +66,38 @@ sealed class UpdateWalletManagerResult {
|
|||
*/
|
||||
data class Coin(override val value: BigDecimal) : CryptoCurrencyAmount
|
||||
|
||||
/**
|
||||
* Token
|
||||
*
|
||||
* @property currencyRawId crypto currency id
|
||||
* @property contractAddress token contract address
|
||||
* @property value amount value
|
||||
*/
|
||||
data class Token(
|
||||
override val value: BigDecimal,
|
||||
val currencyRawId: CryptoCurrency.RawID?,
|
||||
val contractAddress: String,
|
||||
) : CryptoCurrencyAmount
|
||||
sealed interface Token : CryptoCurrencyAmount {
|
||||
val currencyRawId: CryptoCurrency.RawID?
|
||||
val contractAddress: String
|
||||
|
||||
/**
|
||||
* Basic Token
|
||||
*
|
||||
* @property currencyRawId crypto currency id
|
||||
* @property contractAddress token contract address
|
||||
* @property value amount value
|
||||
*/
|
||||
data class BasicToken(
|
||||
override val value: BigDecimal,
|
||||
override val currencyRawId: CryptoCurrency.RawID?,
|
||||
override val contractAddress: String,
|
||||
) : Token
|
||||
|
||||
/**
|
||||
* Yield Supply Token
|
||||
*
|
||||
* @property currencyRawId crypto currency id
|
||||
* @property contractAddress token contract address
|
||||
* @property value amount value
|
||||
* @property yieldSupplyStatus status of the yield token
|
||||
*/
|
||||
data class YieldSupplyToken(
|
||||
override val value: BigDecimal,
|
||||
override val currencyRawId: CryptoCurrency.RawID?,
|
||||
override val contractAddress: String,
|
||||
val yieldSupplyStatus: YieldSupplyStatus,
|
||||
) : Token
|
||||
}
|
||||
}
|
||||
|
||||
/** Crypto currency transaction */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue