Updated on 2026-08-14
This commit is contained in:
parent
5352dfcb6d
commit
1c737dda31
2 changed files with 12 additions and 10 deletions
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue