Updated on 2026-08-14

This commit is contained in:
Tangem 2022-10-24 15:52:36 +04:00
parent ae92fd9361
commit 101ea6998e
2 changed files with 13 additions and 3 deletions

View file

@ -137,4 +137,13 @@ fun Blockchain.toCoinId(): String {
Blockchain.SaltPay, Blockchain.SaltPayTestnet -> "xdai"
Blockchain.Unknown -> "unknown"
}
}
}
fun Blockchain.isSupportedInApp(): Boolean {
return !excludedBlockchains.contains(this)
}
private val excludedBlockchains = listOf(
Blockchain.Optimism, // TODO: remove when fee calculation is fixed
Blockchain.SaltPay,
)

View file

@ -21,8 +21,9 @@ fun Card.supportedBlockchains(): List<Blockchain> {
(Blockchain.fromCurve(EllipticCurve.Secp256k1) + Blockchain.fromCurve(EllipticCurve.Ed25519)).distinct()
}
}
val filtered = supportedBlockchains.filter { isTestCard == it.isTestnet() }
return filtered
return supportedBlockchains
.filter { isTestCard == it.isTestnet() }
.filter { it.isSupportedInApp() }
}
fun Card.supportedTokens(): List<Blockchain> {