Updated on 2026-08-14
This commit is contained in:
parent
ae92fd9361
commit
101ea6998e
2 changed files with 13 additions and 3 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue