Updated on 2026-08-14
This commit is contained in:
parent
b9b612c1b8
commit
81203441bd
3 changed files with 6 additions and 8 deletions
|
|
@ -14,7 +14,9 @@ import com.tangem.datasource.config.models.ConfigModel
|
|||
import com.tangem.datasource.config.models.ConfigValueModel
|
||||
import com.tangem.datasource.config.models.FeatureModel
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
internal class ConfigManagerImpl @Inject constructor() : ConfigManager {
|
||||
|
||||
override var config: Config = Config()
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
|
||||
// replace tokens in wallet tokens list with loaded same
|
||||
val loadedOnWalletsMap = mutableSetOf<String>()
|
||||
val tokensInWallet = userWalletManager.getUserTokens(networkId, true)
|
||||
val tokensInWallet = userWalletManager.getUserTokens(networkId = networkId, isExcludeCustom = true)
|
||||
.filter { it.symbol != initialCurrency.symbol }
|
||||
.map { token ->
|
||||
allLoadedTokens.firstOrNull { it.symbol == token.symbol }?.let {
|
||||
|
|
@ -95,13 +95,9 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
it.token.name.lowercase().contains(searchQueryLowerCase) ||
|
||||
it.token.symbol.lowercase().contains(searchQueryLowerCase)
|
||||
}
|
||||
// val tokensBalance = userWalletManager.getCurrentWalletTokensBalance(networkId, emptyList())
|
||||
// .mapValues { SwapAmount(it.value.value, it.value.decimals) }
|
||||
// val appCurrency = userWalletManager.getUserAppCurrency()
|
||||
// val rates = repository.getRates(appCurrency.code, tokensInWallet.map { it.id })
|
||||
return FoundTokensState(
|
||||
tokensInWallet = tokensInWallet, // getTokensWithBalance(tokensInWallet, tokensBalance, rates, appCurrency),
|
||||
loadedTokens = loadedTokens, // loadedTokens.map { TokenWithBalance(it) },
|
||||
tokensInWallet = tokensInWallet,
|
||||
loadedTokens = loadedTokens,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ internal class SwapViewModel @Inject constructor(
|
|||
uiState = stateBuilder.loadingPermissionState(uiState)
|
||||
}
|
||||
is TxState.UserCancelled -> {
|
||||
// do nothing
|
||||
/* no-op */
|
||||
}
|
||||
else -> {
|
||||
uiState = stateBuilder.createErrorTransaction(uiState, it) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue