Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-26 13:20:41 +03:00
parent 73bf0b7617
commit 128faaec8d
4 changed files with 24 additions and 12 deletions

View file

@ -85,11 +85,20 @@ object BlockchainUtils {
excludedBlockchains: ExcludedBlockchains,
hotExcludedBlockchains: Set<Blockchain>,
hasOnlyHotWallets: Boolean = false,
coinId: String? = null,
contractAddress: String? = null,
): Boolean {
val blockchain = Blockchain.fromNetworkId(blockchainId)
val blockchain = Blockchain.fromNetworkId(blockchainId) ?: return false
return blockchain != null && blockchain !in excludedBlockchains &&
(hasOnlyHotWallets.not() || blockchain !in hotExcludedBlockchains)
if (blockchain in excludedBlockchains) return false
if (hasOnlyHotWallets && blockchain in hotExcludedBlockchains) return false
if (!contractAddress.isNullOrEmpty()) {
if (!blockchain.canHandleTokens()) return false
if (coinId != null && !isNotBlockedByTerraV1Filter(blockchainId, coinId)) return false
}
return true
}
fun isArbitrum(blockchainId: String): Boolean {