diff --git a/app/src/main/java/com/tangem/tap/network/auth/ExpressAuthProviderImpl.kt b/app/src/main/java/com/tangem/tap/network/auth/ExpressAuthProviderImpl.kt deleted file mode 100644 index 2a7f65eee3..0000000000 --- a/app/src/main/java/com/tangem/tap/network/auth/ExpressAuthProviderImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.tangem.tap.network.auth - -import com.tangem.datasource.config.ConfigManager -import com.tangem.datasource.local.userwallet.UserWalletsStore -import com.tangem.lib.auth.ExpressAuthProvider -import com.tangem.lib.auth.sessionId.ExpressSessionIdGenerator -import java.util.UUID - -class ExpressAuthProviderImpl( - private val userWalletsStore: UserWalletsStore, - private val configManager: ConfigManager, -) : ExpressAuthProvider, ExpressSessionIdGenerator { - - private var uuid = UUID.randomUUID() - - override fun getApiKey(): String { - return configManager.config.tangemExpressApiKey - } - - override fun getUserId(): String { - return userWalletsStore.selectedUserWalletOrNull?.walletId?.stringValue ?: "" - } - - override fun getSessionId(): String { - return uuid.toString() - } - - override fun generateNewSessionId() { - uuid = UUID.randomUUID() - } -} \ No newline at end of file diff --git a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultMarketCryptoCurrencyRepository.kt b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultMarketCryptoCurrencyRepository.kt index 84188ea775..a210d96273 100644 --- a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultMarketCryptoCurrencyRepository.kt +++ b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultMarketCryptoCurrencyRepository.kt @@ -11,6 +11,10 @@ class DefaultMarketCryptoCurrencyRepository( ) : MarketCryptoCurrencyRepository { override suspend fun isExchangeable(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency): Boolean { + return getExchangeableFlag(userWalletId, cryptoCurrency) && !cryptoCurrency.isCustom + } + + private suspend fun getExchangeableFlag(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency): Boolean { val contractAddress = (cryptoCurrency as? CryptoCurrency.Token)?.contractAddress ?: EMPTY_CONTRACT_ADDRESS_VALUE return assetsStore.getSyncOrNull(userWalletId)?.find { diff --git a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt index 96303ba8ad..f1af16641e 100644 --- a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt +++ b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt @@ -79,7 +79,8 @@ internal class SwapInteractorImpl @Inject constructor( val currencyFilter = it.currency.network.backendId != currency.network.backendId || it.currency.getContractAddress() != currency.getContractAddress() val statusFilter = it.value is CryptoCurrencyStatus.Loaded - statusFilter && currencyFilter + val notCustomTokenFilter = !it.currency.isCustom + statusFilter && currencyFilter && notCustomTokenFilter } if (walletCurrencyStatusesExceptInitial.isEmpty()) {