diff --git a/data/tokens/src/main/kotlin/com/tangem/data/tokens/utils/QuotesUnsupportedCurrenciesIdAdapter.kt b/data/tokens/src/main/kotlin/com/tangem/data/tokens/utils/QuotesUnsupportedCurrenciesIdAdapter.kt index 2a3ff567e6..c3600a3053 100644 --- a/data/tokens/src/main/kotlin/com/tangem/data/tokens/utils/QuotesUnsupportedCurrenciesIdAdapter.kt +++ b/data/tokens/src/main/kotlin/com/tangem/data/tokens/utils/QuotesUnsupportedCurrenciesIdAdapter.kt @@ -1,5 +1,7 @@ package com.tangem.data.tokens.utils +import com.tangem.blockchain.common.Blockchain +import com.tangem.blockchainsdk.utils.toCoinId import com.tangem.datasource.api.tangemTech.models.QuotesResponse /** @@ -48,16 +50,16 @@ internal class QuotesUnsupportedCurrenciesIdAdapter { /** * Map that contains unsupported currencies and their replacement for request */ + private val ethCoinId = Blockchain.Ethereum.toCoinId() private val UNSUPPORTED_IDS_WITH_REPLACEMENTS = mapOf( - "optimistic-ethereum" to "ethereum", - "arbitrum-one" to "ethereum", - "zksync-ethereum" to "ethereum", - "manta-pacific" to "ethereum", - "polygon-zkevm-ethereum" to "ethereum", - "aurora-ethereum" to "ethereum", - "base-ethereum" to "ethereum", - "cyberconnect" to "ethereum", - "blast" to "ethereum", + Blockchain.Optimism.toCoinId() to ethCoinId, + Blockchain.Arbitrum.toCoinId() to ethCoinId, + Blockchain.ZkSyncEra.toCoinId() to ethCoinId, + Blockchain.Manta.toCoinId() to ethCoinId, + Blockchain.PolygonZkEVM.toCoinId() to ethCoinId, + Blockchain.Aurora.toCoinId() to ethCoinId, + Blockchain.Base.toCoinId() to ethCoinId, + Blockchain.Blast.toCoinId() to ethCoinId, ) } } \ No newline at end of file diff --git a/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt b/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt index 58b9388a8e..8d53ec6fb6 100644 --- a/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt +++ b/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt @@ -327,7 +327,7 @@ fun Blockchain.toCoinId(): String { Blockchain.Joystream -> "joystream" Blockchain.Bittensor -> "bittensor" Blockchain.Filecoin -> "filecoin" - Blockchain.Blast, Blockchain.BlastTestnet -> "blast" + Blockchain.Blast, Blockchain.BlastTestnet -> "blast-ethereum" Blockchain.Cyber, Blockchain.CyberTestnet -> "cyberconnect" } }