Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-15 10:22:10 +03:00
parent bc0ecea749
commit 794f1f0914
8 changed files with 12 additions and 11 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() }
}
}