Updated on 2026-08-14
This commit is contained in:
parent
b4544ed2b4
commit
1079568b3e
5 changed files with 168 additions and 127 deletions
|
|
@ -103,8 +103,10 @@ public class TangemCard {
|
|||
if (Strings.isNullOrEmpty(token))
|
||||
return;
|
||||
String oldName = getBlockchain().getOfficialName();
|
||||
String newName = String.format("%s (%s)", oldName, token);
|
||||
//String newName = String.format("%s - %s ERC20 token", token, oldName);
|
||||
String newName = token + " <br><small><small> " + oldName + " ERC20 token</small></small>";
|
||||
setBlockchainName(newName);
|
||||
|
||||
}
|
||||
|
||||
private String blochchainName = "";
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import android.nfc.Tag
|
|||
import android.nfc.tech.IsoDep
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.text.Html
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import com.tangem.data.nfc.VerifyCardTask
|
||||
|
|
@ -49,7 +50,13 @@ class EmptyWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, Card
|
|||
card!!.loadFromBundle(intent.extras!!.getBundle("Card"))
|
||||
|
||||
tvIssuer.text = card!!.issuerDescription
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
//tvBlockchain.text = card!!.blockchainName
|
||||
if (card!!.tokenSymbol.length > 1) {
|
||||
val html = Html.fromHtml(card!!.blockchainName)
|
||||
tvBlockchain.text = html
|
||||
} else
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
|
||||
tvCardID.text = card!!.cidDescription
|
||||
imgBlockchain.setImageResource(card!!.blockchain.getImageResource(this, card!!.tokenSymbol))
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import com.tangem.wallet.BuildConfig
|
|||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.fr_loaded_wallet.*
|
||||
import org.json.JSONException
|
||||
import java.math.BigDecimal
|
||||
import java.math.BigInteger
|
||||
import java.util.*
|
||||
|
||||
|
|
@ -110,12 +111,6 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
val engine = CoinEngineFactory.create(card!!.blockchain)
|
||||
val visibleFlag = engine?.inOutPutVisible() ?: true
|
||||
|
||||
try {
|
||||
ivQR.setImageBitmap(UtilHelper.generateQrCode(engine.getShareWalletUri(card).toString()))
|
||||
} catch (e: WriterException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
btnExtract.isEnabled = false
|
||||
btnExtract.backgroundTintList = inactiveColor
|
||||
|
||||
|
|
@ -134,7 +129,6 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
}
|
||||
btnCopy.setOnClickListener { doShareWallet(false) }
|
||||
tvWallet.setOnClickListener { doShareWallet(false) }
|
||||
ivQR.setOnClickListener { doShareWallet(true) }
|
||||
btnLoad.setOnClickListener {
|
||||
//if (BuildConfig.DEBUG) {
|
||||
if (true) {
|
||||
|
|
@ -842,9 +836,14 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
|
||||
tvWallet.text = card!!.wallet
|
||||
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
// tvBlockchain.text = card!!.blockchainName
|
||||
if (card!!.tokenSymbol.length > 1) {
|
||||
val html = Html.fromHtml(card!!.blockchainName)
|
||||
tvBlockchain.text = html
|
||||
} else
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
|
||||
if (card!!.hasBalanceInfo() && (card!!.balance != 0L) && (card!!.balance != null)) {
|
||||
if (card!!.hasBalanceInfo()) {
|
||||
btnExtract.isEnabled = true
|
||||
btnExtract.backgroundTintList = activeColor
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.nfc.Tag
|
|||
import android.os.Bundle
|
||||
import android.support.v4.app.Fragment
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.text.Html
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -287,7 +288,13 @@ class VerifyCard : Fragment(), NfcAdapter.ReaderCallback {
|
|||
|
||||
tvIssuer.text = card!!.issuerDescription
|
||||
tvCardRegistredDate.text = card!!.personalizationDateTimeDescription
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
//tvBlockchain.text = card!!.blockchainName
|
||||
if (card!!.tokenSymbol.length > 1) {
|
||||
val html = Html.fromHtml(card!!.blockchainName)
|
||||
tvBlockchain.text = html
|
||||
} else
|
||||
tvBlockchain.text = card!!.blockchainName
|
||||
|
||||
tvValidationNode.text = card!!.validationNodeDescription
|
||||
|
||||
ivBlockchain.setImageResource(card!!.blockchain.getLogoImageResource(card!!.blockchainID, card!!.tokenSymbol))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue