Updated on 2026-08-14

This commit is contained in:
Tangem 2020-07-20 17:41:20 +03:00
parent 9e2c2aa3de
commit 5343873ad4
3 changed files with 42 additions and 14 deletions

View file

@ -0,0 +1,37 @@
package com.tangem.data
import java.util.*
private val payIdSupported = EnumSet.of(
Blockchain.Ripple,
Blockchain.Ethereum,
Blockchain.Bitcoin,
Blockchain.Token,
Blockchain.Litecoin,
Blockchain.Stellar,
Blockchain.StellarAsset,
Blockchain.Binance,
Blockchain.Cardano,
Blockchain.Ducatus,
Blockchain.BitcoinCash,
Blockchain.Binance,
Blockchain.BinanceAsset,
Blockchain.Rootstock,
Blockchain.RootstockToken,
Blockchain.Tezos,
Blockchain.Eos,
Blockchain.Matic
)
fun Blockchain.isPayIdSupported(): Boolean {
return payIdSupported.contains(this)
}
fun Blockchain.getPayIdNetwork(): String {
return when (this) {
Blockchain.Ripple -> "XRPL"
Blockchain.Rootstock, Blockchain.RootstockToken -> "RSK"
else -> this.currency
}
}