Updated on 2026-08-14
This commit is contained in:
parent
613bb9226f
commit
3f1102f232
20 changed files with 247 additions and 172 deletions
|
|
@ -3,8 +3,8 @@ package com.tangem.domain.tokens.model
|
|||
import java.math.BigDecimal
|
||||
|
||||
sealed class FeePaidCurrency {
|
||||
object Coin : FeePaidCurrency()
|
||||
object SameCurrency : FeePaidCurrency()
|
||||
data object Coin : FeePaidCurrency()
|
||||
data object SameCurrency : FeePaidCurrency()
|
||||
data class Token(
|
||||
val tokenId: CryptoCurrency.ID,
|
||||
val name: String,
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ class GetFeePaidCryptoCurrencyStatusSyncUseCase(
|
|||
|
||||
return either {
|
||||
when (feePaidCurrency) {
|
||||
FeePaidCurrency.Coin -> getCryptoCurrency(operations, cryptoCurrency.id)
|
||||
FeePaidCurrency.Coin -> getCryptoCurrencyStatus(operations, cryptoCurrency.id)
|
||||
FeePaidCurrency.SameCurrency -> cryptoCurrencyStatus
|
||||
is FeePaidCurrency.Token -> getCryptoCurrency(operations, feePaidCurrency.tokenId)
|
||||
is FeePaidCurrency.Token -> getCryptoCurrencyStatus(operations, feePaidCurrency.tokenId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun getCryptoCurrency(
|
||||
private suspend fun getCryptoCurrencyStatus(
|
||||
operations: CurrenciesStatusesOperations,
|
||||
cryptoCurrencyId: CryptoCurrency.ID,
|
||||
): CryptoCurrencyStatus? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue