Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-15 10:27:44 +03:00
commit 8494d369a8
9 changed files with 13 additions and 10 deletions

View file

@ -16,7 +16,7 @@ fun Blockchain.getGreyedOutIconRes(): Int {
Blockchain.Ethereum, Blockchain.EthereumTestnet -> R.drawable.ic_eth_no_color
Blockchain.EthereumClassic, Blockchain.EthereumClassicTestnet -> R.drawable.ic_eth_no_color
Blockchain.RSK -> R.drawable.ic_rsk_no_color
Blockchain.Cardano, Blockchain.CardanoShelley -> R.drawable.ic_cardano_no_color
Blockchain.Cardano -> R.drawable.ic_cardano_no_color
Blockchain.Tezos -> R.drawable.ic_tezos_no_color
Blockchain.XRP -> R.drawable.ic_xrp_no_color
Blockchain.Stellar -> R.drawable.ic_stellar_no_color

View file

@ -208,8 +208,7 @@ internal class AddCustomTokenViewModel @Inject constructor(
val defaultNetwork = createNetworkSelectorItem(blockchain = Blockchain.Unknown)
return listOf(defaultNetwork) + Blockchain.values()
.filter { blockchain ->
reduxStateHolder.scanResponse?.card?.supportedBlockchains()?.contains(blockchain) == true &&
blockchain != Blockchain.Cardano
reduxStateHolder.scanResponse?.card?.supportedBlockchains()?.contains(blockchain) == true
}
.sortedBy(Blockchain::fullName)
.map(::createNetworkSelectorItem)
@ -273,7 +272,7 @@ internal class AddCustomTokenViewModel @Inject constructor(
),
) + Blockchain.values()
.filter { blockchain ->
blockchain.isSupportedInApp() && !blockchain.isTestnet() && blockchain != Blockchain.Cardano
blockchain.isSupportedInApp() && !blockchain.isTestnet()
}
.sortedBy(Blockchain::fullName)
.map(::createDerivationPathSelectorAdditionalItem)

View file

@ -12,7 +12,7 @@ object MultipleAddressUiHelper {
Blockchain.BitcoinTestnet,
Blockchain.Litecoin,
Blockchain.BitcoinCash,
Blockchain.CardanoShelley,
Blockchain.Cardano,
)
fun typeToId(type: AddressType, blockchain: Blockchain): Int {

View file

@ -119,7 +119,7 @@ internal class MercuryoService(private val environment: MercuryoEnvironment) : E
return when (currencyName) {
"BNB" -> Blockchain.BSC
"ETH" -> Blockchain.Ethereum
"ADA" -> Blockchain.CardanoShelley
"ADA" -> Blockchain.Cardano
else -> Blockchain.values().find { it.currency.lowercase() == currencyName.lowercase() }
}
}

View file

@ -96,6 +96,7 @@ internal class ConfigManagerImpl @Inject constructor() : ConfigManager {
mainnetApiKey = configValues.tonCenterKeys.mainnet,
testnetApiKey = configValues.tonCenterKeys.testnet,
),
chiaFireAcademyApiKey = configValues.chiaFireAcademyApiKey,
),
appsFlyerDevKey = configValues.appsFlyer.appsFlyerDevKey,
amplitudeApiKey = configValues.amplitudeApiKey,

View file

@ -38,6 +38,7 @@ class ConfigValueModel(
val kaspaSecondaryApiUrl: String,
val walletConnectProjectId: String,
val tangemComAuthorization: String?,
val chiaFireAcademyApiKey: String?,
)
data class AppsFlyer(

View file

@ -103,6 +103,9 @@ internal class TangemCardTypesResolver(
"BINANCE/test" -> {
Blockchain.BSCTestnet
}
"CARDANO" -> {
Blockchain.Cardano
}
else -> {
Blockchain.fromId(blockchainName)
}

View file

@ -44,7 +44,7 @@ object TapWorkarounds {
private val tangemNoteBatches = mapOf(
"AB01" to Blockchain.Bitcoin,
"AB02" to Blockchain.Ethereum,
"AB03" to Blockchain.CardanoShelley,
"AB03" to Blockchain.Cardano,
"AB04" to Blockchain.Dogecoin,
"AB05" to Blockchain.BSC,
"AB06" to Blockchain.XRP,

View file

@ -32,7 +32,7 @@ fun Blockchain.Companion.fromNetworkId(networkId: String): Blockchain? {
"bitcoin/test" -> Blockchain.BitcoinTestnet
"bitcoin-cash" -> Blockchain.BitcoinCash
"bitcoin-cash/test" -> Blockchain.BitcoinCashTestnet
"cardano" -> Blockchain.CardanoShelley
"cardano" -> Blockchain.Cardano
"dogecoin" -> Blockchain.Dogecoin
"ducatus" -> Blockchain.Ducatus
"litecoin" -> Blockchain.Litecoin
@ -94,7 +94,6 @@ fun Blockchain.toNetworkId(): String {
Blockchain.BitcoinCash -> "bitcoin-cash"
Blockchain.BitcoinCashTestnet -> "bitcoin-cash/test"
Blockchain.Cardano -> "cardano"
Blockchain.CardanoShelley -> "cardano"
Blockchain.Dogecoin -> "dogecoin"
Blockchain.Ducatus -> "ducatus"
Blockchain.Ethereum -> "ethereum"
@ -157,7 +156,7 @@ fun Blockchain.toCoinId(): String {
Blockchain.Ethereum, Blockchain.EthereumTestnet -> "ethereum"
Blockchain.EthereumClassic, Blockchain.EthereumClassicTestnet -> "ethereum-classic"
Blockchain.Stellar, Blockchain.StellarTestnet -> "stellar"
Blockchain.Cardano, Blockchain.CardanoShelley -> "cardano"
Blockchain.Cardano -> "cardano"
Blockchain.Polygon, Blockchain.PolygonTestnet -> "matic-network"
Blockchain.Arbitrum, Blockchain.ArbitrumTestnet -> "ethereum"
Blockchain.Avalanche, Blockchain.AvalancheTestnet -> "avalanche-2"