Updated on 2026-08-14

This commit is contained in:
Tangem 2020-06-17 09:55:24 +00:00
commit f7ca9c16ae
6 changed files with 20 additions and 11 deletions

View file

@ -2,6 +2,8 @@ package com.tangem.data;
import com.tangem.tangem_sdk.R;
import java.util.EnumSet;
/**
* Created by dvol on 06.08.2017.
*/
@ -36,6 +38,8 @@ public enum Blockchain {
FlowDemo("FLOW/demo", "", 1.0, R.drawable.tangem2, "Flow demo"),
TokenEmv("TTW", "ETH", 1.0, R.drawable.ic_logo_ethereum, "Ethereum");
static private EnumSet<Blockchain> payIdSupported = EnumSet.of(Blockchain.Ripple, Blockchain.Ethereum, Blockchain.Bitcoin);
Blockchain(String ID, String currency, double multiplier, int imageResource, String officialName) {
mID = ID;
mCurrency = currency;
@ -126,4 +130,8 @@ public enum Blockchain {
return scheme;
}
public Boolean isPayIdSupported() {
return payIdSupported.contains(this);
}
}

View file

@ -66,7 +66,6 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
companion object {
val TAG: String = LoadedWalletFragment::class.java.simpleName
const val PAY_ID_TANGEM = "\$payid.tangem.com"
val payIdSupported = setOf(Blockchain.Ripple, Blockchain.Ethereum, Blockchain.Bitcoin)
}
override val layoutId = R.layout.fr_loaded_wallet
@ -156,7 +155,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
getString(R.string.loaded_wallet_load_via_qr)
)
if (payIdSupported.contains(ctx.blockchain)) {
if (ctx.blockchain.isPayIdSupported) {
ivPayId.visibility = View.VISIBLE
ivPayId.imageAlpha = 100
ivPayId.setOnClickListener { createPayIdDialog() }