Updated on 2026-08-14
This commit is contained in:
parent
f33ada0352
commit
de49ae56f7
2 changed files with 7 additions and 16 deletions
|
|
@ -79,6 +79,13 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
it.currency.getContractAddress() != currency.getContractAddress()
|
||||
}
|
||||
|
||||
if (walletCurrencyStatusesExceptInitial.isEmpty()) {
|
||||
return TokensDataStateExpress(
|
||||
fromGroup = CurrenciesGroup(emptyList(), emptyList()),
|
||||
toGroup = CurrenciesGroup(emptyList(), emptyList()),
|
||||
)
|
||||
}
|
||||
|
||||
val pairsLeast = getPairs(
|
||||
initialCurrency = LeastTokenInfo(
|
||||
contractAddress = (currency as? CryptoCurrency.Token)?.contractAddress ?: "0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.feature.swap.domain.models.ui
|
||||
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.feature.swap.domain.models.domain.CryptoCurrencySwapInfo
|
||||
|
||||
data class TokensDataStateExpress(
|
||||
|
|
@ -11,19 +10,4 @@ data class TokensDataStateExpress(
|
|||
data class CurrenciesGroup(
|
||||
val available: List<CryptoCurrencySwapInfo>,
|
||||
val unavailable: List<CryptoCurrencySwapInfo>,
|
||||
)
|
||||
|
||||
data class FoundTokensStateExpress(
|
||||
val tokensInWallet: List<TokenWithBalanceExpress>,
|
||||
val loadedTokens: List<TokenWithBalanceExpress>,
|
||||
)
|
||||
|
||||
data class TokenWithBalanceExpress(
|
||||
val token: CryptoCurrency,
|
||||
val tokenBalanceData: TokenBalanceDataExpress? = null,
|
||||
)
|
||||
|
||||
data class TokenBalanceDataExpress(
|
||||
val amount: String?,
|
||||
val amountEquivalent: String?,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue