Updated on 2026-08-14

This commit is contained in:
Tangem 2020-07-20 14:02:09 +00:00
commit 84b17ae529
3 changed files with 13 additions and 8 deletions

View file

@ -49,6 +49,7 @@ import com.tangem.ui.fragment.pin.PinSwapFragment
import com.tangem.ui.navigation.NavigationResultListener
import com.tangem.util.LOG
import com.tangem.util.UtilHelper
import com.tangem.util.extensions.isStart2CoinCard
import com.tangem.wallet.*
import kotlinx.android.synthetic.main.dialog_pay_id.view.*
import kotlinx.android.synthetic.main.fr_loaded_wallet.*
@ -155,7 +156,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
getString(R.string.loaded_wallet_load_via_qr)
)
if (ctx.blockchain.isPayIdSupported) {
if (ctx.blockchain.isPayIdSupported && !ctx.card.isStart2CoinCard()) {
ivPayId.visibility = View.VISIBLE
ivPayId.imageAlpha = 100
ivPayId.setOnClickListener { createPayIdDialog() }
@ -325,7 +326,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
}
private fun getPayIdIfApplicable() {
if (ctx.blockchain.isPayIdSupported) {
if (ctx.blockchain.isPayIdSupported && !ctx.card.isStart2CoinCard()) {
viewModel.getPayId(
Util.byteArrayToHexString(ctx.card.cid!!),
Util.byteArrayToHexString(ctx.card.cardPublicKey!!))
@ -960,9 +961,4 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
clipboard.primaryClip = ClipData.newPlainText(text, text)
Toast.makeText(activity, R.string.loaded_wallet_toast_copied, Toast.LENGTH_LONG).show()
}
private fun TangemCard.isStart2CoinCard(): Boolean {
return (Util.bytesToHex(ctx.card?.cid)?.startsWith("1") == true)
}
}

View file

@ -0,0 +1,6 @@
package com.tangem.util.extensions
import com.tangem.tangem_card.data.TangemCard
import com.tangem.tangem_card.util.Util
fun TangemCard.isStart2CoinCard(): Boolean = (Util.bytesToHex(this.cid).startsWith("1"))

View file

@ -17,6 +17,7 @@ import com.tangem.ui.fragment.BaseFragment
import com.tangem.ui.fragment.qr.CameraPermissionManager
import com.tangem.ui.navigation.NavigationResultListener
import com.tangem.util.UtilHelper
import com.tangem.util.extensions.isStart2CoinCard
import com.tangem.wallet.CoinEngineFactory
import com.tangem.wallet.R
import com.tangem.wallet.TangemContext
@ -45,7 +46,9 @@ class PrepareTransactionFragment : BaseFragment(), NavigationResultListener, Nfc
Html.fromHtml(engine!!.balanceHTML)
tvBalance.text = html
if (ctx.blockchain.isPayIdSupported) etWallet.hint = getString(R.string.prepare_transaction_hint_address_or_pay_id)
if (ctx.blockchain.isPayIdSupported && !ctx.card.isStart2CoinCard()) {
etWallet.hint = getString(R.string.prepare_transaction_hint_address_or_pay_id)
}
if (!engine.allowSelectFeeInclusion()) {
rgIncFee.visibility = View.INVISIBLE