Updated on 2026-08-14
This commit is contained in:
commit
ecc6243780
19 changed files with 382 additions and 376 deletions
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -7,7 +7,7 @@
|
|||
</component>
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="10">
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class TangemContext {
|
|||
return token + " <br><small><small> " + getBlockchain().getOfficialName() + " smart contract token</small></small>";
|
||||
}
|
||||
if (blockchain == Blockchain.NftToken) {
|
||||
return card.getTokenSymbol().substring(4) + " <br><small><small> " + getBlockchain().getOfficialName() + " smart contract token</small></small>";
|
||||
return card.getTokenSymbol().substring(4) + " <br><small><small> " + getBlockchain().getOfficialName() + " NFT token</small></small>";
|
||||
}
|
||||
return blockchain.getOfficialName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,10 +663,11 @@ public class BtcCashEngine extends CoinEngine {
|
|||
|
||||
byte[][] hashesToSign=ps.getHashesToSign();
|
||||
byte[] signFromCard = new byte[64 * hashesToSign.length];
|
||||
Arrays.fill(signFromCard, (byte) 0x01);
|
||||
byte[] txForSend=ps.onSignCompleted(signFromCard);
|
||||
onNeedSendTransaction = onNeedSendTransactionBackup;
|
||||
Log.e(TAG,"txForSend.length="+String.valueOf(txForSend.length));
|
||||
return txForSend.length;
|
||||
return txForSend.length +1;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(TAG, "Can't calculate transaction size -> use default!");
|
||||
|
|
|
|||
|
|
@ -7,26 +7,23 @@ enum class BitcoinNode(val host: String, val port: Int, val proto: String) {
|
|||
N_004("electrum.vom-stausee.de", 50001, "tcp"),
|
||||
N_005("electrum2.eff.ro", 50001, "tcp"),
|
||||
N_006("electrum.coinucopia.io", 50001, "tcp"),
|
||||
N_007("electrum.nute.net", 50002, "ssl"),
|
||||
N_008("electrum.coinop.cc", 50002, "ssl"),
|
||||
N_009("electrum.vom-stausee.de", 50002, "ssl"),
|
||||
N_010("dedi.jochen-hoenicke.de", 50002, "ssl"),
|
||||
N_011("e-x.not.fyi", 50002, "ssl"),
|
||||
N_012("ip120.ip-54-37-91.eu", 50002, "ssl"),
|
||||
N_013("electrum.villocq.com", 50002, "ssl"),
|
||||
N_014("electrum.anduck.net", 50012, "ssl"),
|
||||
N_015("technetium.network", 50002, "ssl"),
|
||||
N_016("electrum.coinucopia.io", 50002, "ssl"),
|
||||
N_017("dimon.trimon.de", 50002, "ssl"),
|
||||
N_018("btc.gravitech.net", 50002, "ssl"),
|
||||
N_019("hetzner01.fischl-online.de", 50002, "ssl"),
|
||||
N_020("fn.48.org", 50002, "ssl"),
|
||||
N_021("vps.hsmiths.com", 50002, "ssl"),
|
||||
N_022("electrum.qtornado.com", 50002, "ssl"),
|
||||
N_023("electrum-server.ninja", 50002, "ssl"),
|
||||
N_024("electrum2.eff.ro", 50002, "ssl"),
|
||||
N_025("electrum.hsmiths.com", 995, "ssl"),
|
||||
N_026("electrum.hsmiths.com", 50002, "ssl"),
|
||||
N_027("139.162.14.142", 50002, "ssl"),
|
||||
N_028("tardis.bauerj.eu", 50002, "ssl"),
|
||||
N_007("electrum.coinop.cc", 50002, "ssl"),
|
||||
N_008("electrum.vom-stausee.de", 50002, "ssl"),
|
||||
N_009("dedi.jochen-hoenicke.de", 50002, "ssl"),
|
||||
N_010("e-x.not.fyi", 50002, "ssl"),
|
||||
N_011("electrum.villocq.com", 50002, "ssl"),
|
||||
N_012("electrum.anduck.net", 50012, "ssl"),
|
||||
N_013("technetium.network", 50002, "ssl"),
|
||||
N_014("electrum.coinucopia.io", 50002, "ssl"),
|
||||
N_015("dimon.trimon.de", 50002, "ssl"),
|
||||
N_016("btc.gravitech.net", 50002, "ssl"),
|
||||
N_017("fn.48.org", 50002, "ssl"),
|
||||
N_018("vps.hsmiths.com", 50002, "ssl"),
|
||||
N_019("electrum.qtornado.com", 50002, "ssl"),
|
||||
N_020("electrum-server.ninja", 50002, "ssl"),
|
||||
N_021("electrum2.eff.ro", 50002, "ssl"),
|
||||
N_022("electrum.hsmiths.com", 995, "ssl"),
|
||||
N_023("electrum.hsmiths.com", 50002, "ssl"),
|
||||
N_024("139.162.14.142", 50002, "ssl"),
|
||||
N_025("tardis.bauerj.eu", 50002, "ssl"),
|
||||
}
|
||||
|
|
@ -738,10 +738,11 @@ public class BtcEngine extends CoinEngine {
|
|||
|
||||
byte[][] hashesToSign = ps.getHashesToSign();
|
||||
byte[] signFromCard = new byte[64 * hashesToSign.length];
|
||||
Arrays.fill(signFromCard, (byte) 0x01);
|
||||
byte[] txForSend = ps.onSignCompleted(signFromCard);
|
||||
onNeedSendTransaction = onNeedSendTransactionBackup;
|
||||
Log.e(TAG, "txForSend.length=" + String.valueOf(txForSend.length));
|
||||
return txForSend.length;
|
||||
return txForSend.length + 1;
|
||||
|
||||
// Log.e(TAG,"txForSend.length="+String.valueOf(txForSend.length)+" realTX.length="+String.valueOf(realTX.length));
|
||||
//
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ enum class LitecoinNode(val host: String, val port: Int, val proto: String) {
|
|||
N_001("backup.electrum-ltc.org", 443, "ssl"),
|
||||
N_002("electrum-ltc.petrkr.net", 60002, "ssl"),
|
||||
N_003("electrum-ltc.bysh.me", 50002, "ssl"),
|
||||
N_004("e-3.claudioboxx.com", 50004, "ssl"),
|
||||
N_005("e-1.claudioboxx.com", 50004, "ssl"),
|
||||
N_006("e-2.claudioboxx.com", 50004, "ssl"),
|
||||
N_007("electrum.ltc.xurious.com", 50002, "ssl"),
|
||||
N_004("e-1.claudioboxx.com", 50004, "ssl"),
|
||||
N_005("e-2.claudioboxx.com", 50004, "ssl"),
|
||||
N_006("electrum.ltc.xurious.com", 50002, "ssl"),
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public class NftTokenEngine extends CoinEngine {
|
|||
public String getBalanceHTML() {
|
||||
if (hasBalanceInfo()) {
|
||||
if (isBalanceNotZero()) {
|
||||
return "AUTHENTIC";// + getBalanceCurrency();
|
||||
return "GENUINE";// + getBalanceCurrency();
|
||||
} else {
|
||||
return "NOT FOUND";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ import kotlinx.android.synthetic.main.activity_confirm_transaction.*
|
|||
import org.greenrobot.eventbus.EventBus
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
||||
|
||||
|
|
@ -200,9 +202,9 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
|
|||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == Constant.REQUEST_CODE_SIGN_TRANSACTION) {
|
||||
if (data != null && data.extras != null) {
|
||||
if (data.extras!!.containsKey("UID") && data.extras!!.containsKey("Card")) {
|
||||
val updatedCard = TangemCard(data.getStringExtra("UID"))
|
||||
updatedCard.loadFromBundle(data.getBundleExtra("Card"))
|
||||
if (data.extras!!.containsKey(EXTRA_TANGEM_CARD_UID) && data.extras!!.containsKey(EXTRA_TANGEM_CARD)) {
|
||||
val updatedCard = TangemCard(data.getStringExtra(EXTRA_TANGEM_CARD_UID))
|
||||
updatedCard.loadFromBundle(data.getBundleExtra(EXTRA_TANGEM_CARD))
|
||||
ctx.card = updatedCard
|
||||
}
|
||||
}
|
||||
|
|
@ -288,7 +290,7 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
|
|||
EventBus.getDefault().post(transactionFinishWithError)
|
||||
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", message)
|
||||
intent.putExtra(Constant.EXTRA_MESSAGE, message)
|
||||
setResult(errorCode, intent)
|
||||
finish()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,13 +29,15 @@ import com.tangem.wallet.R
|
|||
import kotlinx.android.synthetic.main.activity_create_new_wallet.*
|
||||
import kotlinx.android.synthetic.main.layout_progress_horizontal.*
|
||||
import kotlinx.android.synthetic.main.layout_touch_card.*
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class CreateNewWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications {
|
||||
companion object {
|
||||
fun callingIntent(context: Context, ctx: TangemContext): Intent {
|
||||
val intent = Intent(context, CreateNewWalletActivity::class.java)
|
||||
intent.putExtra("UID", ctx.card!!.uid)
|
||||
intent.putExtra("Card", ctx.card!!.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, ctx.card!!.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, ctx.card!!.asBundle)
|
||||
return intent
|
||||
}
|
||||
}
|
||||
|
|
@ -70,24 +72,20 @@ class CreateNewWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
try {
|
||||
// get IsoDep handle and run cardReader thread
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
// Log.v(TAG, "UID: " + sUID);
|
||||
|
||||
if (sUID == ctx.card!!.uid) {
|
||||
if (sUID == ctx.card.uid) {
|
||||
if (lastReadSuccess)
|
||||
isoDep.timeout = ctx.card!!.pauseBeforePIN2 + 5000
|
||||
isoDep.timeout = ctx.card.pauseBeforePIN2 + 5000
|
||||
else
|
||||
isoDep.timeout = ctx.card!!.pauseBeforePIN2 + 65000
|
||||
isoDep.timeout = ctx.card.pauseBeforePIN2 + 65000
|
||||
|
||||
createNewWalletTask = CreateNewWalletTask(ctx.card, NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, this)
|
||||
createNewWalletTask!!.start()
|
||||
createNewWalletTask?.start()
|
||||
} else {
|
||||
// Log.d(TAG, "Mismatch card UID (" + sUID + " instead of " + mCard.getUID() + ")");
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
@ -113,31 +111,31 @@ class CreateNewWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
if (cardProtocol.error == null) {
|
||||
rlProgressBar.post { rlProgressBar.visibility = View.GONE }
|
||||
|
||||
progressBar!!.post {
|
||||
progressBar!!.progress = 100
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.GREEN)
|
||||
progressBar?.post {
|
||||
progressBar?.progress = 100
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.GREEN)
|
||||
val intent = Intent()
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(Activity.RESULT_OK, intent)
|
||||
finish()
|
||||
}
|
||||
} else {
|
||||
lastReadSuccess = false
|
||||
if (cardProtocol.error is CardProtocol.TangemException_InvalidPIN) {
|
||||
progressBar!!.post {
|
||||
progressBar!!.progress = 100
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
progressBar?.post {
|
||||
progressBar?.progress = 100
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
}
|
||||
progressBar!!.postDelayed({
|
||||
progressBar?.postDelayed({
|
||||
try {
|
||||
progressBar!!.progress = 0
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar!!.visibility = View.INVISIBLE
|
||||
progressBar?.progress = 0
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", "Cannot create wallet. Make sure you enter correct PIN2!")
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card!!.asBundle)
|
||||
intent.putExtra(Constant.EXTRA_MESSAGE, getString(R.string.cannot_create_wallet))
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card!!.asBundle)
|
||||
setResult(Constant.RESULT_INVALID_PIN, intent)
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ import com.tangem.wallet.R
|
|||
import kotlinx.android.synthetic.main.activity_empty_wallet.*
|
||||
import kotlinx.android.synthetic.main.layout_tangem_card.*
|
||||
import javax.inject.Inject
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class EmptyWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications {
|
||||
companion object {
|
||||
|
|
@ -88,8 +90,8 @@ class EmptyWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, Card
|
|||
requestPIN2Count = 0
|
||||
val intent = Intent(baseContext, PinRequestActivity::class.java)
|
||||
intent.putExtra("mode", PinRequestActivity.Mode.RequestPIN2.toString())
|
||||
intent.putExtra("UID", ctx.card!!.uid)
|
||||
intent.putExtra("Card", ctx.card!!.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, ctx.card!!.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, ctx.card!!.asBundle)
|
||||
startActivityForResult(intent, Constant.REQUEST_CODE_REQUEST_PIN2)
|
||||
}
|
||||
|
||||
|
|
@ -111,17 +113,17 @@ class EmptyWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, Card
|
|||
}
|
||||
finish()
|
||||
} else {
|
||||
if (data != null && data.extras!!.containsKey("UID") && data.extras!!.containsKey("Card")) {
|
||||
val updatedCard = TangemCard(data.getStringExtra("UID"))
|
||||
updatedCard.loadFromBundle(data.getBundleExtra("Card"))
|
||||
if (data != null && data.extras!!.containsKey(EXTRA_TANGEM_CARD_UID) && data.extras!!.containsKey(EXTRA_TANGEM_CARD)) {
|
||||
val updatedCard = TangemCard(data.getStringExtra(EXTRA_TANGEM_CARD_UID))
|
||||
updatedCard.loadFromBundle(data.getBundleExtra(EXTRA_TANGEM_CARD))
|
||||
ctx.card = updatedCard
|
||||
}
|
||||
if (resultCode == Constant.RESULT_INVALID_PIN && requestPIN2Count < 2) {
|
||||
requestPIN2Count++
|
||||
val intent = Intent(baseContext, PinRequestActivity::class.java)
|
||||
intent.putExtra("mode", PinRequestActivity.Mode.RequestPIN2.toString())
|
||||
intent.putExtra("UID", ctx.card!!.uid)
|
||||
intent.putExtra("Card", ctx.card!!.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, ctx.card!!.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, ctx.card!!.asBundle)
|
||||
startActivityForResult(intent, Constant.REQUEST_CODE_REQUEST_PIN2)
|
||||
return
|
||||
}
|
||||
|
|
@ -138,15 +140,11 @@ class EmptyWalletActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, Card
|
|||
override fun onTagDiscovered(tag: Tag) {
|
||||
try {
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
if (ctx.card!!.uid != sUID) {
|
||||
LOG.d(TAG, "Invalid UID: $sUID")
|
||||
if (ctx.card.uid != sUID) {
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
return
|
||||
} else {
|
||||
LOG.d(TAG, "UID: $sUID")
|
||||
}
|
||||
|
||||
if (lastReadSuccess)
|
||||
|
|
|
|||
|
|
@ -10,26 +10,17 @@ import android.nfc.NfcAdapter
|
|||
import android.nfc.Tag
|
||||
import android.nfc.tech.IsoDep
|
||||
import android.os.Bundle
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.scottyab.rootbeer.RootBeer
|
||||
import com.tangem.App
|
||||
import com.tangem.Constant
|
||||
import com.tangem.data.Logger
|
||||
import com.tangem.data.network.ServerApiCommon
|
||||
import com.tangem.di.Navigator
|
||||
import com.tangem.domain.wallet.CoinEngineFactory
|
||||
import com.tangem.domain.wallet.TangemContext
|
||||
import com.tangem.ui.dialog.NoExtendedLengthSupportDialog
|
||||
import com.tangem.ui.dialog.RootFoundDialog
|
||||
import com.tangem.ui.dialog.WaitSecurityDelayDialog
|
||||
import com.tangem.card_android.android.nfc.NfcDeviceAntennaLocation
|
||||
import com.tangem.card_android.android.nfc.NfcLifecycleObserver
|
||||
import com.tangem.card_android.android.reader.NfcManager
|
||||
|
|
@ -39,6 +30,14 @@ import com.tangem.card_android.data.saveToBundle
|
|||
import com.tangem.card_common.data.TangemCard
|
||||
import com.tangem.card_common.reader.CardProtocol
|
||||
import com.tangem.card_common.tasks.ReadCardInfoTask
|
||||
import com.tangem.data.Logger
|
||||
import com.tangem.data.network.ServerApiCommon
|
||||
import com.tangem.di.Navigator
|
||||
import com.tangem.domain.wallet.CoinEngineFactory
|
||||
import com.tangem.domain.wallet.TangemContext
|
||||
import com.tangem.ui.dialog.NoExtendedLengthSupportDialog
|
||||
import com.tangem.ui.dialog.RootFoundDialog
|
||||
import com.tangem.ui.dialog.WaitSecurityDelayDialog
|
||||
import com.tangem.util.CommonUtil
|
||||
import com.tangem.util.LOG
|
||||
import com.tangem.util.PhoneUtility
|
||||
|
|
@ -49,6 +48,8 @@ import kotlinx.android.synthetic.main.layout_touch_card.*
|
|||
import java.io.File
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications, PopupMenu.OnMenuItemClickListener {
|
||||
|
||||
|
|
@ -142,7 +143,6 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
private fun verifyPermissions() {
|
||||
NfcManager.verifyPermissions(this)
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.e("QRScanActivity", "User hasn't granted permission to use camera")
|
||||
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.CAMERA), Constant.REQUEST_CODE_REQUEST_CAMERA_PERMISSIONS)
|
||||
}
|
||||
}
|
||||
|
|
@ -220,21 +220,15 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
try {
|
||||
// get IsoDep handle and run cardReader thread
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
|
||||
LOG.e(TAG, "setTimeout(" + (1000 + 3000 * unsuccessReadCount) + ")")
|
||||
if (unsuccessReadCount < 2) {
|
||||
if (unsuccessReadCount < 2)
|
||||
isoDep.timeout = 2000 + 5000 * unsuccessReadCount
|
||||
} else {
|
||||
else
|
||||
isoDep.timeout = 90000
|
||||
}
|
||||
|
||||
lastTag = tag
|
||||
|
||||
readCardInfoTask = ReadCardInfoTask(NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, this)
|
||||
readCardInfoTask?.start()
|
||||
|
||||
LOG.i(TAG, "onTagDiscovered " + Arrays.toString(tag.id))
|
||||
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
nfcManager.notifyReadResult(false)
|
||||
|
|
@ -275,23 +269,26 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
|
||||
// TODO - ??? remove save and load???
|
||||
val cardInfo = Bundle()
|
||||
cardInfo.putString("UID", cardProtocol.card.uid)
|
||||
val bCard = Bundle()
|
||||
|
||||
cardInfo.putString(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
cardInfo.putBundle(EXTRA_TANGEM_CARD, bCard)
|
||||
cardProtocol.card.saveToBundle(bCard)
|
||||
cardInfo.putBundle("Card", bCard)
|
||||
|
||||
val uid = cardInfo.getString("UID")
|
||||
val card = TangemCard(uid)
|
||||
cardInfo.getBundle("Card")?.let { card.loadFromBundle(it) }
|
||||
cardInfo.getBundle(EXTRA_TANGEM_CARD)?.let { card.loadFromBundle(it) }
|
||||
|
||||
val ctx = TangemContext(card)
|
||||
when {
|
||||
card.status == TangemCard.Status.Loaded -> lastTag?.let {
|
||||
val engineCoin = CoinEngineFactory.create(ctx)
|
||||
?: throw CardProtocol.TangemException("Can't create CoinEngine!")
|
||||
engineCoin.defineWallet()
|
||||
navigator.showLoadedWallet(this, it, ctx)
|
||||
if (engineCoin != null) {
|
||||
engineCoin.defineWallet()
|
||||
navigator.showLoadedWallet(this, it, ctx)
|
||||
}
|
||||
}
|
||||
// ?: throw CardProtocol.TangemException("Can't create CoinEngine!")
|
||||
card.status == TangemCard.Status.Empty -> navigator.showEmptyWallet(this, ctx)
|
||||
card.status == TangemCard.Status.Purged -> Toast.makeText(this, R.string.erased_wallet, Toast.LENGTH_SHORT).show()
|
||||
card.status == TangemCard.Status.NotPersonalized -> Toast.makeText(this, R.string.not_personalized, Toast.LENGTH_SHORT).show()
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ import com.tangem.card_common.util.Util
|
|||
import com.tangem.util.LOG
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.activity_pin_swap.*
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications {
|
||||
companion object {
|
||||
|
|
@ -45,7 +47,7 @@ class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProt
|
|||
|
||||
private lateinit var nfcManager: NfcManager
|
||||
|
||||
private var card: TangemCard? = null
|
||||
private lateinit var card: TangemCard;
|
||||
private var newPIN: String? = null
|
||||
private var newPIN2: String? = null
|
||||
|
||||
|
|
@ -61,33 +63,30 @@ class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProt
|
|||
lifecycle.addObserver(NfcLifecycleObserver(nfcManager))
|
||||
|
||||
card = TangemCard(intent.getStringExtra(EXTRA_TANGEM_CARD_UID))
|
||||
card!!.loadFromBundle(intent.extras!!.getBundle(EXTRA_TANGEM_CARD))
|
||||
|
||||
card.loadFromBundle(intent.extras!!.getBundle(EXTRA_TANGEM_CARD))
|
||||
|
||||
newPIN = intent.getStringExtra(Constant.EXTRA_NEW_PIN)
|
||||
newPIN2 = intent.getStringExtra(Constant.EXTRA_NEW_PIN_2)
|
||||
|
||||
tvCardID.text = card!!.cidDescription
|
||||
tvCardID.text = card.cidDescription
|
||||
|
||||
progressBar = findViewById(R.id.progressBar)
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar!!.visibility = View.INVISIBLE
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
override fun onTagDiscovered(tag: Tag) {
|
||||
try {
|
||||
// get IsoDep handle and run cardReader thread
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
LOG.d(TAG, "UID: $sUID")
|
||||
|
||||
if (sUID == card!!.uid) {
|
||||
isoDep.timeout = card!!.pauseBeforePIN2 + 65000
|
||||
if (sUID == card.uid) {
|
||||
isoDep.timeout = card.pauseBeforePIN2 + 65000
|
||||
swapPinTask = SwapPINTask(card, NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, this, newPIN, newPIN2)
|
||||
swapPinTask!!.start()
|
||||
swapPinTask?.start()
|
||||
} else {
|
||||
LOG.d(TAG, "Mismatch card UID (" + sUID + " instead of " + card!!.uid + ")")
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
|
@ -121,8 +120,8 @@ class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProt
|
|||
progressBar!!.progress = 100
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.GREEN)
|
||||
val intent = Intent()
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(Activity.RESULT_OK, intent)
|
||||
finish()
|
||||
}
|
||||
|
|
@ -138,8 +137,8 @@ class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProt
|
|||
progressBar!!.visibility = View.INVISIBLE
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", "Cannot change PIN(s). Make sure you enter correct PIN2!")
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(RESULT_INVALID_PIN, intent)
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
|
|
@ -160,11 +159,11 @@ class PinSwapActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProt
|
|||
}
|
||||
}
|
||||
|
||||
progressBar!!.postDelayed({
|
||||
progressBar?.postDelayed({
|
||||
try {
|
||||
progressBar!!.progress = 0
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar!!.visibility = View.INVISIBLE
|
||||
progressBar?.progress = 0
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import kotlinx.android.synthetic.main.activity_purge.*
|
|||
import kotlinx.android.synthetic.main.layout_touch_card.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import javax.inject.Inject
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications {
|
||||
companion object {
|
||||
|
|
@ -74,7 +76,7 @@ class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoc
|
|||
nfcDeviceAntenna = NfcDeviceAntennaLocation(this, ivHandCardHorizontal, ivHandCardVertical, llHand, llNfc)
|
||||
nfcDeviceAntenna.init()
|
||||
|
||||
tvCardID.text = ctx.card!!.cidDescription
|
||||
tvCardID.text = ctx.card.cidDescription
|
||||
progressBar.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar.visibility = View.INVISIBLE
|
||||
}
|
||||
|
|
@ -88,20 +90,15 @@ class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoc
|
|||
try {
|
||||
// get IsoDep handle and run cardReader thread
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
LOG.d(TAG, "UID: $sUID")
|
||||
|
||||
if (sUID == ctx.card!!.uid) {
|
||||
isoDep.timeout = ctx.card!!.pauseBeforePIN2 + 65000
|
||||
if (sUID == ctx.card.uid) {
|
||||
isoDep.timeout = ctx.card.pauseBeforePIN2 + 65000
|
||||
purgeTask = PurgeTask(ctx.card, NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, this)
|
||||
purgeTask!!.start()
|
||||
purgeTask?.start()
|
||||
} else {
|
||||
LOG.d(TAG, "Mismatch card UID (" + sUID + " instead of " + ctx.card.uid + ")")
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
@ -155,8 +152,8 @@ class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoc
|
|||
progressBar?.progressTintList = ColorStateList.valueOf(Color.GREEN)
|
||||
|
||||
val intent = Intent()
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(Activity.RESULT_OK, intent)
|
||||
|
||||
EventBus.getDefault().post(DeletingWalletFinish())
|
||||
|
|
@ -176,8 +173,8 @@ class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoc
|
|||
progressBar?.visibility = View.INVISIBLE
|
||||
|
||||
val intent = Intent()
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
intent.putExtra("message", getString(R.string.cannot_erase_wallet))
|
||||
setResult(RESULT_INVALID_PIN, intent)
|
||||
finish()
|
||||
|
|
@ -186,15 +183,15 @@ class PurgeActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoc
|
|||
}
|
||||
}, 500)
|
||||
} else {
|
||||
progressBar!!.post {
|
||||
progressBar?.post {
|
||||
if (cardProtocol.error is CardProtocol.TangemException_ExtendedLengthNotSupported) {
|
||||
if (!NoExtendedLengthSupportDialog.allReadyShowed)
|
||||
NoExtendedLengthSupportDialog().show(supportFragmentManager, NoExtendedLengthSupportDialog.TAG)
|
||||
} else
|
||||
Toast.makeText(baseContext, R.string.try_to_scan_again, Toast.LENGTH_LONG).show()
|
||||
|
||||
progressBar!!.progress = 100
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
progressBar?.progress = 100
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,24 +15,26 @@ import android.widget.Toast
|
|||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.tangem.App
|
||||
import com.tangem.Constant
|
||||
import com.tangem.card_android.android.nfc.NfcDeviceAntennaLocation
|
||||
import com.tangem.card_android.android.nfc.NfcLifecycleObserver
|
||||
import com.tangem.card_android.android.reader.NfcManager
|
||||
import com.tangem.card_android.android.reader.NfcReader
|
||||
import com.tangem.card_common.reader.CardProtocol
|
||||
import com.tangem.card_common.tasks.SignTask
|
||||
import com.tangem.card_common.util.Util
|
||||
import com.tangem.domain.wallet.CoinEngine
|
||||
import com.tangem.domain.wallet.CoinEngineFactory
|
||||
import com.tangem.domain.wallet.TangemContext
|
||||
import com.tangem.ui.dialog.NoExtendedLengthSupportDialog
|
||||
import com.tangem.ui.dialog.WaitSecurityDelayDialog
|
||||
import com.tangem.card_android.android.nfc.NfcDeviceAntennaLocation
|
||||
import com.tangem.card_android.android.nfc.NfcLifecycleObserver
|
||||
import com.tangem.card_android.android.reader.NfcManager
|
||||
import com.tangem.card_android.android.reader.NfcReader
|
||||
import com.tangem.card_android.data.asBundle
|
||||
import com.tangem.card_common.reader.CardProtocol
|
||||
import com.tangem.card_common.tasks.SignTask
|
||||
import com.tangem.card_common.util.Util
|
||||
import com.tangem.util.LOG
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.activity_sign_transaction.*
|
||||
import kotlinx.android.synthetic.main.layout_progress_horizontal.*
|
||||
import kotlinx.android.synthetic.main.layout_touch_card.*
|
||||
import com.tangem.card_android.data.asBundle
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD
|
||||
import com.tangem.card_android.data.EXTRA_TANGEM_CARD_UID
|
||||
|
||||
class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtocol.Notifications {
|
||||
|
||||
|
|
@ -114,20 +116,17 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
try {
|
||||
// get IsoDep handle and run cardReader thread
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
|
||||
if (sUID == ctx.card!!.uid) {
|
||||
if (lastReadSuccess) {
|
||||
isoDep.timeout = ctx.card!!.pauseBeforePIN2 + 5000
|
||||
} else {
|
||||
isoDep.timeout = ctx.card!!.pauseBeforePIN2 + 65000
|
||||
}
|
||||
if (sUID == ctx.card.uid) {
|
||||
if (lastReadSuccess)
|
||||
isoDep.timeout = ctx.card.pauseBeforePIN2 + 5000
|
||||
else
|
||||
isoDep.timeout = ctx.card.pauseBeforePIN2 + 65000
|
||||
|
||||
val coinEngine = CoinEngineFactory.create(ctx)
|
||||
?: throw CardProtocol.TangemException("Can't create CoinEngine!")
|
||||
coinEngine.setOnNeedSendTransaction { tx ->
|
||||
coinEngine?.setOnNeedSendTransaction { tx ->
|
||||
if (tx != null) {
|
||||
val intent = Intent(this, SendTransactionActivity::class.java)
|
||||
ctx.saveToIntent(intent)
|
||||
|
|
@ -135,19 +134,19 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
startActivityForResult(intent, Constant.REQUEST_CODE_SEND_TRANSACTION_)
|
||||
}
|
||||
}
|
||||
val transactionToSign = coinEngine.constructTransaction(amount, fee, isIncludeFee, outAddressStr)
|
||||
val transactionToSign = coinEngine?.constructTransaction(amount, fee, isIncludeFee, outAddressStr)
|
||||
|
||||
signTransactionTask = SignTask(ctx.card, NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, this, transactionToSign)
|
||||
signTransactionTask!!.start()
|
||||
signTransactionTask?.start()
|
||||
} else
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
|
||||
} catch (e: CardProtocol.TangemException_WrongAmount) {
|
||||
try {
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", getString(R.string.cannot_sign_transaction_wrong_amount))
|
||||
intent.putExtra("UID", ctx.card.uid)
|
||||
intent.putExtra("Card", ctx.card.asBundle)
|
||||
intent.putExtra(Constant.EXTRA_MESSAGE, getString(R.string.cannot_sign_transaction_wrong_amount))
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, ctx.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, ctx.card.asBundle)
|
||||
setResult(Activity.RESULT_CANCELED, intent)
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
|
|
@ -196,9 +195,9 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", getString(R.string.cannot_sign_transaction_make_sure_you_enter_correct_pin_2))
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(Constant.EXTRA_MESSAGE, getString(R.string.cannot_sign_transaction_make_sure_you_enter_correct_pin_2))
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(Constant.RESULT_INVALID_PIN_, intent)
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
|
|
@ -209,16 +208,16 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
if (cardProtocol.error is CardProtocol.TangemException_WrongAmount) {
|
||||
try {
|
||||
val intent = Intent()
|
||||
intent.putExtra("message", getString(R.string.cannot_sign_transaction_wrong_amount))
|
||||
intent.putExtra("UID", cardProtocol.card.uid)
|
||||
intent.putExtra("Card", cardProtocol.card.asBundle)
|
||||
intent.putExtra(Constant.EXTRA_MESSAGE, getString(R.string.cannot_sign_transaction_wrong_amount))
|
||||
intent.putExtra(EXTRA_TANGEM_CARD_UID, cardProtocol.card.uid)
|
||||
intent.putExtra(EXTRA_TANGEM_CARD, cardProtocol.card.asBundle)
|
||||
setResult(Activity.RESULT_CANCELED, intent)
|
||||
finish()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
progressBar!!.post {
|
||||
progressBar?.post {
|
||||
if (cardProtocol.error is CardProtocol.TangemException_ExtendedLengthNotSupported) {
|
||||
if (!NoExtendedLengthSupportDialog.allReadyShowed) {
|
||||
NoExtendedLengthSupportDialog.message = getText(R.string.the_nfc_adapter_length_apdu).toString() + "\n" + getText(R.string.the_nfc_adapter_length_apdu_advice).toString()
|
||||
|
|
@ -227,8 +226,8 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
} else {
|
||||
Toast.makeText(baseContext, R.string.try_to_scan_again, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
progressBar!!.progress = 100
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
progressBar?.progress = 100
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.RED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -242,11 +241,11 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
}
|
||||
}, 500)
|
||||
|
||||
progressBar!!.postDelayed({
|
||||
progressBar?.postDelayed({
|
||||
try {
|
||||
progressBar!!.progress = 0
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar!!.visibility = View.INVISIBLE
|
||||
progressBar?.progress = 0
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
@ -256,11 +255,11 @@ class SignTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback,
|
|||
override fun onReadCancel() {
|
||||
signTransactionTask = null
|
||||
|
||||
progressBar!!.postDelayed({
|
||||
progressBar?.postDelayed({
|
||||
try {
|
||||
progressBar!!.progress = 0
|
||||
progressBar!!.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar!!.visibility = View.INVISIBLE
|
||||
progressBar?.progress = 0
|
||||
progressBar?.progressTintList = ColorStateList.valueOf(Color.DKGRAY)
|
||||
progressBar?.visibility = View.INVISIBLE
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -744,8 +744,7 @@ class LoadedWallet : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback
|
|||
private fun startVerify(tag: Tag?) {
|
||||
try {
|
||||
val isoDep = IsoDep.get(tag)
|
||||
?: throw CardProtocol.TangemException(getString(R.string.wrong_tag_err))
|
||||
val uid = tag!!.id
|
||||
val uid = tag?.id
|
||||
val sUID = Util.byteArrayToHexString(uid)
|
||||
if (ctx.card.uid != sUID || cardProtocol != null) {
|
||||
nfcManager.ignoreTag(isoDep.tag)
|
||||
|
|
@ -757,7 +756,6 @@ class LoadedWallet : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback
|
|||
else
|
||||
isoDep.timeout = 65000
|
||||
|
||||
|
||||
verifyCardTask = VerifyCardTask(ctx.card, NfcReader(nfcManager, isoDep), App.localStorage, App.pinStorage, App.firmwaresStorage, this)
|
||||
verifyCardTask?.start()
|
||||
} catch (e: Exception) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<string name="no_connection">No connection with blockchain nodes</string>
|
||||
<string name="contin">Continue</string>
|
||||
<string name="not_found">Not found</string>
|
||||
<string name="wrong_tag_err">Not ISO tag!</string>
|
||||
<!--<string name="wrong_tag_err">Not ISO tag!</string>-->
|
||||
<string name="msgCardMustBeLoaded">Card must be loaded first!</string>
|
||||
<string name="tag_lost_err">Tag lost!</string>
|
||||
<string name="cmd_suffix">command</string>
|
||||
|
|
@ -135,6 +135,7 @@
|
|||
<string name="to_change_pin_codes">to change PIN/PIN2 codes</string>
|
||||
<string name="by_tapping_the_card">By tapping the card, you will permanently remove the blockchain wallet. Ensure there will be no further incoming transactions</string>
|
||||
<string name="cannot_erase_wallet">Cannot erase wallet. Make sure you enter correct PIN2!</string>
|
||||
<string name="cannot_create_wallet">Cannot create wallet. Make sure you enter correct PIN2!</string>
|
||||
|
||||
<!-- PrepareTransactionActivity -->
|
||||
<string name="enter_wallet_address">enter wallet address</string>
|
||||
|
|
|
|||
|
|
@ -20,4 +20,6 @@
|
|||
<string name="_9">9</string>
|
||||
<string name="_0">0</string>
|
||||
|
||||
<string name="ex_cant_create_coinEngine">Can\'t create CoinEngine!</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -5,206 +5,224 @@ enum class NfcLocation(val codename: String, val fullName: String, val orientati
|
|||
model2("walleye", "Google Pixel 2", 0, 40, 15, 0),
|
||||
model3("taimen", "Google Pixel 2 XL", 0, 40, 15, 0),
|
||||
model4("marlin", "Google Pixel XL", 0, 65, 25, 0),
|
||||
model5("blueline", "Google Pixel 3 ", 0, 60, 30, 0),
|
||||
model5("blueline", "Google Pixel 3", 0, 60, 30, 0),
|
||||
model6("crosshatch", "Google Pixel 3 XL", 0, 15, 20, 0),
|
||||
model7("htc_pme", "HTC 10 ", 0, 50, 20, 0),
|
||||
model7("htc_pme", "HTC 10", 0, 50, 20, 0),
|
||||
model8("htc_himau", "HTC One M9", 0, 50, 20, 0),
|
||||
model9("htc_himaw", "HTC One M9", 0, 50, 20, 0),
|
||||
model10("htc_oce", "HTC U Ultra", 0, 50, 20, 0),
|
||||
model11("htc_ocn", "HTC U11", 0, 50, 25, 0),
|
||||
model12("htc_ocm", "HTC U11+", 0, 50, 60, 0),
|
||||
model13("htc_ocluhljapan", "HTC U11 Life", 1, 50, 25, 0),
|
||||
model14("htc_ime", "HTC U12+", 0, 50, 20, 0),
|
||||
model15("htc_bre2dugl", "HTC Desire 12s", 0, 50, 10, 0),
|
||||
model16("htc_imldugl", "HTC U12 Life", 0, 60, 20, 0),
|
||||
model17("HWCOL", "Huawei Honor 10", 0, 50, 0, 0),
|
||||
model18("HWRVL", "Huawei Honor Note 10", 0, 50, 0, 0),
|
||||
model19("HWFRD", "Huawei Honor 8", 0, 50, 0, 0),
|
||||
model20("HWDUK", "Huawei Honor 8 Pro", 0, 50, 0, 0),
|
||||
model21("HWSTF", "Huawei Honor 9", 0, 50, 0, 0),
|
||||
model22("HWBKL", "Huawei Honor View 10", 0, 50, 0, 0),
|
||||
model23("HWALP", "Huawei Mate 10", 0, 50, 0, 0),
|
||||
model24("HWBLA", "Huawei Mate 10 Pro", 0, 50, 0, 0),
|
||||
model25("HWBLN-H", "Huawei Mate 9 Lite / Honor 6X", 0, 40, 0, 0),
|
||||
model26("angler", "Huawei Nexus 6P", 0, 40, 15, 0),
|
||||
model27("HWFIG-H", "Huawei P Smart", 0, 45, 0, 0),
|
||||
model28("HWVTR", "Huawei P10", 0, 50, 0, 0),
|
||||
model29("HWWAS-H", "Huawei P10 lite", 0, 50, 0, 0),
|
||||
model30("HWVKY", "Huawei P10 Plus", 0, 50, 0, 0),
|
||||
model31("HWEML", "Huawei P20", 0, 50, 50, 0),
|
||||
model32("HWANE", "Huawei P20 Lite", 0, 50, 50, 0),
|
||||
model33("HWCLT", "Huawei P20 Pro", 0, 50, 50, 0),
|
||||
model34("HW-01K", "Huawei P20 Pro", 0, 50, 50, 0),
|
||||
model35("hwALE-", "Huawei P8 Lite ", 1, 75, 65, 0),
|
||||
model36("HWPRA-H", "Huawei P8 Lite 2017", 0, 50, 25, 0),
|
||||
model37("HWEVA", "Huawei P9", 0, 50, 0, 0),
|
||||
model38("HWVNS-?", "Huawei P9 Lite", 0, 60, 45, 0),
|
||||
model39("HWVIE", "Huawei P9 Plus", 0, 50, 0, 0),
|
||||
model40("HWPOT-H", "Huawei P smart 2019", 0, 50, 20, 0),
|
||||
model41("HWPCT", "Huawei HONOR V20", 0, 60, 20, 0),
|
||||
model42("HWHMA", "Huawei Mate 20", 0, 50, 20, 0),
|
||||
model43("HWLYA", "Huawei Mate 20 Pro", 0, 50, 20, 0),
|
||||
model44("HWEVR", "Huawei Mate 20 X", 0, 50, 20, 0),
|
||||
model45("HWTNY", "Huawei Honor Magic 2", 0, 50, 0, 0),
|
||||
model46("h1", "LG G5", 0, 30, 20, 0),
|
||||
model47("lucye", "LG G6", 0, 50, 50, 0),
|
||||
model48("judyln", "LG G7", 0, 50, 50, 0),
|
||||
model49("hammerhead", "LG Nexus 5", 0, 50, 50, 0),
|
||||
model50("bullhead", "LG Nexus 5X", 0, 45, 15, 0),
|
||||
model51("mh", "LG Q6", 1, 25, 50, 0),
|
||||
model52("ph2n", "LG Stylo 2+", 0, 75, 20, 0),
|
||||
model53("sf340n", "LG Stylo 3+", 0, 75, 20, 0),
|
||||
model54("ph1n", "LG Stylus 2", 0, 75, 20, 0),
|
||||
model55("msf3", "LG Stylus 3", 0, 75, 20, 0),
|
||||
model56("elsa", "LG V20", 0, 50, 15, 0),
|
||||
model57("joan", "LG V30", 0, 50, 50, 0),
|
||||
model58("L-01K", "LG V30+", 0, 50, 50, 0),
|
||||
model59("judyp", "LG V35 ThinQ", 0, 50, 50, 0),
|
||||
model60("judyln", "LG G7 ThinQ", 0, 50, 50, 0),
|
||||
model61("L-02K", "LG JOJO", 0, 50, 60, 0),
|
||||
model62("mcv5a", "LG Q7", 0, 50, 60, 0),
|
||||
model63("cv7a", "LG Stylo 4", 0, 50, 60, 0),
|
||||
model64("nora_8917_n", "Motorola Moto E5", 0, 50, 40, 0),
|
||||
model65("potter_n", "Motorola Moto G5 Plus", 0, 50, 5, 0),
|
||||
model66("montana_n", "Motorola Moto G5s", 0, 50, 5, 0),
|
||||
model67("sanders_n", "Motorola Moto G5s Plus", 0, 50, 5, 0),
|
||||
model68("ali_n", "Motorola Moto G6", 0, 50, 35, 0),
|
||||
model69("aljeter_n", "Motorola Moto G6 Play", 0, 50, 35, 0),
|
||||
model70("evert_n", "Motorola Moto G6 Plus", 0, 40, 40, 0),
|
||||
model71("payton", "Motorola Moto X4", 0, 50, 40, 0),
|
||||
model72("nash", "Motorola Moto Z2 Force", 0, 50, 40, 0),
|
||||
model73("albus", "Motorola Moto Z2 Play", 0, 50, 5, 0),
|
||||
model74("beckham", "Motorola Moto Z3 Play", 0, 50, 0, 0),
|
||||
model75("shamu", "Motorola Nexus 6", 0, 50, 60, 0),
|
||||
model76("NE1", "Nokia 3", 0, 40, 30, 0),
|
||||
model77("ND1", "Nokia 5", 0, 40, 30, 0),
|
||||
model78("PLE", "Nokia 6", 0, 50, 20, 0),
|
||||
model79("PL2_sprout", "Nokia 6.1", 0, 50, 0, 0),
|
||||
model80("C1N", "Nokia 7", 0, 50, 25, 0),
|
||||
model81("B2N", "Nokia 7 Plus", 0, 75, 10, 0),
|
||||
model82("NB1", "Nokia 8", 0, 50, 30, 0),
|
||||
model83("A1N_sprout", "Nokia 8 Sirocco", 0, 90, 0, 0),
|
||||
model84("A1N", "Nokia 8 Sirocco", 0, 90, 0, 0),
|
||||
model85("OnePlus3", "OnePlus 3", 0, 50, 15, 0),
|
||||
model86("OnePlus3T", "OnePlus 3t", 0, 50, 15, 0),
|
||||
model87("OnePlus5", "OnePlus 5", 0, 80, 5, 0),
|
||||
model88("OnePlus5T", "OnePlus 5t", 0, 80, 5, 0),
|
||||
model89("OnePlus6", "OnePlus 6", 0, 50, 20, 0),
|
||||
model90("A0001", "OnePlus One", 0, 50, 50, 0),
|
||||
model91("OnePlus6T", "OnePlus6T", 0, 50, 20, 0),
|
||||
model92("OnePlus6TSingle", "OnePlus6T", 0, 50, 20, 0),
|
||||
model93("a5x", "Samsung Galaxy A5 (2016)", 1, 50, 45, 0),
|
||||
model94("a5y17lte", "Samsung Galaxy A5 (2017)", 1, 65, 45, 0),
|
||||
model95("a7y17lte", "Samsung Galaxy A7 (2017)", 1, 60, 40, 0),
|
||||
model96("jackpotlte", "Samsung Galaxy A8 (2018)", 1, 50, 50, 0),
|
||||
model97("a8", "Samsung Galaxy A8 / A8 (2016)", 0, 50, 15, 0),
|
||||
model98("jackpot2lte", "Samsung Galaxy A8+", 1, 50, 45, 0),
|
||||
model99("a9xltechn", "Samsung Galaxy A9 (2016)", 1, 50, 45, 0),
|
||||
model100("c5ltechn", "Samsung Galaxy C5", 0, 45, 15, 0),
|
||||
model101("c5pltechn", "Samsung Galaxy C5", 0, 45, 15, 0),
|
||||
model102("c5proltechn", "Samsung Galaxy C5 Pro", 1, 45, 15, 0),
|
||||
model103("c7ltechn", "Samsung Galaxy C7", 0, 50, 15, 0),
|
||||
model104("c7prolte", "Samsung Galaxy C7 Pro", 1, 50, 15, 0),
|
||||
model105("c9lte", "Samsung Galaxy C9 Pro", 0, 45, 15, 0),
|
||||
model106("j5x", "Samsung Galaxy J5 (2016)", 1, 40, 50, 0),
|
||||
model107("j5y17lte", "Samsung Galaxy J5 (2017) / J5 Pro", 1, 60, 50, 0),
|
||||
model108("j6lte", "Samsung Galaxy J6", 1, 60, 50, 0),
|
||||
model109("j7y17lte", "Samsung Galaxy J7 Pro", 1, 40, 50, 0),
|
||||
model110("noblelte", "Samsung Galaxy Note5", 1, 50, 60, 0),
|
||||
model111("SCV37", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model112("SC-01K", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model113("great", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model114("crownqle", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model115("crownlte", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model116("SC-01L", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model117("SCV40", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model118("SC-05G", "Samsung Galaxy S6", 1, 30, 60, 0),
|
||||
model119("zeroflte", "Samsung Galaxy S6", 1, 30, 60, 0),
|
||||
model120("SCV31", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model121("404SC", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model122("SC-04G", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model123("zerolte", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model124("zenlte", "Samsung Galaxy S6 edge+", 1, 50, 55, 0),
|
||||
model125("heroqlte", "Samsung Galaxy S7", 1, 50, 45, 0),
|
||||
model126("herolte", "Samsung Galaxy S7", 1, 50, 45, 0),
|
||||
model127("poseidonlteatt", "Samsung Galaxy S7 Active", 1, 45, 55, 0),
|
||||
model128("SCV33", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model129("SC-02H", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model130("hero2", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model131("SCV36", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model132("SC-02J", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model133("dreamlte", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model134("dreamqlte", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model135("cruiserlte", "Samsung Galaxy S8 Active", 1, 50, 50, 0),
|
||||
model136("SCV35", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model137("SC-03J", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model138("dream2", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model139("SCV38", "Samsung Galaxy S9", 1, 50, 50, 0),
|
||||
model140("SC-02K", "Samsung Galaxy S9", 1, 50, 50, 0),
|
||||
model141("starlte", "Samsung Galaxy S9", 1, 50, 50, 0),
|
||||
model142("starqlte", "Samsung Galaxy S9", 1, 50, 50, 0),
|
||||
model143("SCV39", "Samsung Galaxy S9+", 1, 50, 60, 0),
|
||||
model144("SC-03K", "Samsung Galaxy S9+", 1, 50, 60, 0),
|
||||
model145("star2", "Samsung Galaxy S9+", 1, 50, 60, 0),
|
||||
model146("F331", "Sony Xperia E5", 0, 50, 25, 0),
|
||||
model147("G33", "Sony Xperia L1", 0, 50, 30, 0),
|
||||
model148("H33", "Sony Xperia L2", 0, 50, 20, 0),
|
||||
model149("H43", "Sony Xperia L2", 0, 50, 20, 0),
|
||||
model150("F512", "Sony Xperia X", 0, 10, 5, 1),
|
||||
model151("suzu", "Sony Xperia X", 0, 10, 5, 1),
|
||||
model152("F5321", "Sony Xperia X Compact", 0, 50, 55, 0),
|
||||
model153("SO-02J", "Sony Xperia X Compact", 0, 50, 55, 0),
|
||||
model154("F813", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model155("SOV33", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model156("SO-04H", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model157("502SO", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model158("F311", "Sony Xperia XA", 0, 50, 20, 0),
|
||||
model159("F321", "Sony Xperia XA Ultra", 0, 50, 25, 0),
|
||||
model160("G31", "Sony Xperia XA1", 0, 50, 20, 0),
|
||||
model161("G34", "Sony Xperia XA1 Plus", 0, 50, 25, 0),
|
||||
model162("G32", "Sony Xperia XA1 Ultra", 0, 50, 20, 0),
|
||||
model163("H31", "Sony Xperia XA2", 0, 50, 15, 0),
|
||||
model164("H41", "Sony Xperia XA2", 0, 50, 15, 0),
|
||||
model165("H32", "Sony Xperia XA2 Ultra", 0, 50, 20, 0),
|
||||
model166("H42", "Sony Xperia XA2 Ultra", 0, 50, 20, 0),
|
||||
model167("F833", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model168("SO-01J", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model169("601SO", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model170("SOV34", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model171("G81", "Sony Xperia XZ Premium", 0, 50, 55, 0),
|
||||
model172("SO-04J", "Sony Xperia XZ Premium", 0, 50, 55, 0),
|
||||
model173("G834", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model174("701SO", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model175("SOV36", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model176("SO-01K", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model177("G8441", "Sony Xperia XZ1 Compact", 0, 50, 30, 0),
|
||||
model178("SO-02K", "Sony Xperia XZ1 Compact", 0, 50, 30, 0),
|
||||
model179("H82", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model180("SOV37", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model181("SO-03K", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model182("702SO", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model183("H8324", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model184("SO-05K", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model185("H8314", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model186("G823", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model187("602SO", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model188("SOV35", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model189("SO-03J", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model190("801SO", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model191("H9493", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model192("H9436", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model193("SOV39", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model194("SO-01L", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model195("H8416", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model196("gemini", "Xiaomi Mi 5", 0, 40, 20, 0),
|
||||
model197("capricorn", "Xiaomi Mi 5S", 0, 50, 10, 0),
|
||||
model198("natrium", "Xiaomi Mi 5S Plus", 0, 45, 15, 0),
|
||||
model199("sagit", "Xiaomi Mi 6", 0, 50, 20, 0),
|
||||
model200("dipper", "Xiaomi Mi 8", 0, 45, 20, 0),
|
||||
model201("ursa", "Xiaomi MI 8 Explorer Edition", 0, 50, 40, 0),
|
||||
model202("lithium", "Xiaomi Mi MIX", 0, 20, 20, 0),
|
||||
model203("chiron", "Xiaomi Mi MIX 2", 0, 45, 20, 0),
|
||||
model204("polaris", "Xiaomi Mi MIX 2S", 0, 45, 20, 0),
|
||||
model205("scorpio", "Xiaomi Mi Note 2", 0, 50, 20, 0),
|
||||
model206("jason", "Xiaomi Mi Note 3", 0, 50, 20, 0)
|
||||
model14("htc_haydugl", "HTC U11 EYEs", 0, 50, 65, 0),
|
||||
model15("htc_haydtwl", "HTC U11 EYEs", 0, 50, 65, 0),
|
||||
model16("htc_ime", "HTC U12+", 0, 50, 20, 0),
|
||||
model17("htc_bre2dugl", "HTC Desire 12s", 0, 50, 10, 0),
|
||||
model18("htc_imldugl", "HTC U12 Life", 0, 60, 20, 0),
|
||||
model19("htc_exodugl", "HTC EXODUS 1", 0, 50, 20, 0),
|
||||
model20("HWCOL", "Huawei Honor 10", 0, 50, 0, 0),
|
||||
model21("HWRVL", "Huawei Honor Note 10", 0, 50, 0, 0),
|
||||
model22("HWFRD", "Huawei Honor 8", 0, 50, 0, 0),
|
||||
model23("HWDUK", "Huawei Honor 8 Pro", 0, 50, 0, 0),
|
||||
model24("HWSTF", "Huawei Honor 9", 0, 50, 0, 0),
|
||||
model25("HWBKL", "Huawei Honor View 10", 0, 50, 0, 0),
|
||||
model26("HWALP", "Huawei Mate 10", 0, 50, 0, 0),
|
||||
model27("HWBLA", "Huawei Mate 10 Pro", 0, 50, 0, 0),
|
||||
model28("HWBLN-H", "Huawei Mate 9 Lite / Honor 6X", 0, 40, 0, 0),
|
||||
model29("angler", "Huawei Nexus 6P", 0, 40, 15, 0),
|
||||
model30("HWFIG-H", "Huawei P Smart", 0, 45, 0, 0),
|
||||
model31("HWVTR", "Huawei P10", 0, 50, 0, 0),
|
||||
model32("HWWAS-H", "Huawei P10 lite", 0, 50, 0, 0),
|
||||
model33("HWVKY", "Huawei P10 Plus", 0, 50, 0, 0),
|
||||
model34("HWEML", "Huawei P20", 0, 50, 50, 0),
|
||||
model35("HWANE", "Huawei P20 Lite", 0, 50, 20, 0),
|
||||
model36("HWCLT", "Huawei P20 Pro", 0, 50, 50, 0),
|
||||
model37("HW-01K", "Huawei P20 Pro", 0, 50, 50, 0),
|
||||
model38("hwALE-", "Huawei P8 Lite", 1, 75, 65, 0),
|
||||
model39("HWPRA-H", "Huawei P8 Lite 2017", 0, 50, 25, 0),
|
||||
model40("HWEVA", "Huawei P9", 0, 50, 0, 0),
|
||||
model41("HWVNS-?", "Huawei P9 Lite", 0, 60, 45, 0),
|
||||
model42("HWVIE", "Huawei P9 Plus", 0, 50, 0, 0),
|
||||
model43("HWPOT-H", "Huawei P smart 2019", 0, 50, 20, 0),
|
||||
model44("HWPCT", "Huawei HONOR V20", 0, 60, 20, 0),
|
||||
model45("HWHMA", "Huawei Mate 20", 0, 50, 20, 0),
|
||||
model46("HWLYA", "Huawei Mate 20 Pro", 0, 50, 20, 0),
|
||||
model47("HWEVR", "Huawei Mate 20 X", 0, 50, 20, 0),
|
||||
model48("HWTNY", "Huawei Honor Magic 2", 0, 50, 0, 0),
|
||||
model49("h1", "LG G5", 0, 30, 20, 0),
|
||||
model50("lucye", "LG G6", 0, 50, 50, 0),
|
||||
model51("judyln", "LG G7", 0, 50, 50, 0),
|
||||
model52("hammerhead", "LG Nexus 5", 0, 50, 50, 0),
|
||||
model53("bullhead", "LG Nexus 5X", 0, 45, 15, 0),
|
||||
model54("mh", "LG Q6", 1, 25, 50, 0),
|
||||
model55("ph2n", "LG Stylo 2+", 0, 75, 20, 0),
|
||||
model56("sf340n", "LG Stylo 3+", 0, 75, 20, 0),
|
||||
model57("ph1n", "LG Stylus 2", 0, 75, 20, 0),
|
||||
model58("msf3", "LG Stylus 3", 0, 75, 20, 0),
|
||||
model59("elsa", "LG V20", 0, 50, 15, 0),
|
||||
model60("joan", "LG V30", 0, 50, 50, 0),
|
||||
model61("L-01K", "LG V30+", 0, 50, 50, 0),
|
||||
model62("judyp", "LG V35 ThinQ", 0, 50, 50, 0),
|
||||
model63("judyln", "LG G7 ThinQ", 0, 50, 50, 0),
|
||||
model64("L-02K", "LG JOJO", 0, 50, 60, 0),
|
||||
model65("mcv5a", "LG Q7", 0, 50, 60, 0),
|
||||
model66("cv7a", "LG Stylo 4", 0, 50, 60, 0),
|
||||
model67("nora_8917_n", "Motorola Moto E5", 0, 50, 40, 0),
|
||||
model68("potter_n", "Motorola Moto G5 Plus", 0, 50, 5, 0),
|
||||
model69("montana_n", "Motorola Moto G5s", 0, 50, 5, 0),
|
||||
model70("sanders_n", "Motorola Moto G5s Plus", 0, 50, 5, 0),
|
||||
model71("ali_n", "Motorola Moto G6", 0, 50, 35, 0),
|
||||
model72("aljeter_n", "Motorola Moto G6 Play", 0, 50, 35, 0),
|
||||
model73("evert_n", "Motorola Moto G6 Plus", 0, 40, 40, 0),
|
||||
model74("river_n", "Motorola moto g(7)", 0, 50, 50, 0),
|
||||
model75("lake_n", "Motorola moto g(7) plus", 0, 50, 50, 0),
|
||||
model76("payton", "Motorola Moto X4", 0, 50, 40, 0),
|
||||
model77("nash", "Motorola Moto Z2 Force", 0, 50, 40, 0),
|
||||
model78("albus", "Motorola Moto Z2 Play", 0, 50, 5, 0),
|
||||
model79("beckham", "Motorola Moto Z3 Play", 0, 50, 0, 0),
|
||||
model80("shamu", "Motorola Nexus 6", 0, 50, 60, 0),
|
||||
model81("NE1", "Nokia 3", 0, 40, 30, 0),
|
||||
model82("ND1", "Nokia 5", 0, 40, 30, 0),
|
||||
model83("PLE", "Nokia 6", 0, 50, 20, 0),
|
||||
model84("PL2_sprout", "Nokia 6.1", 0, 50, 0, 0),
|
||||
model85("C1N", "Nokia 7", 0, 50, 25, 0),
|
||||
model86("B2N", "Nokia 7 Plus", 0, 75, 10, 0),
|
||||
model87("NB1", "Nokia 8", 0, 50, 30, 0),
|
||||
model88("A1N_sprout", "Nokia 8 Sirocco", 0, 90, 0, 0),
|
||||
model89("A1N", "Nokia 8 Sirocco", 0, 90, 0, 0),
|
||||
model90("OnePlus3", "OnePlus 3", 0, 50, 15, 0),
|
||||
model91("OnePlus3T", "OnePlus 3t", 0, 50, 15, 0),
|
||||
model92("OnePlus5", "OnePlus 5", 0, 80, 5, 0),
|
||||
model93("OnePlus5T", "OnePlus 5t", 0, 80, 5, 0),
|
||||
model94("OnePlus6", "OnePlus 6", 0, 50, 20, 0),
|
||||
model95("A0001", "OnePlus One", 0, 50, 50, 0),
|
||||
model96("OnePlus6T", "OnePlus6T", 0, 50, 20, 0),
|
||||
model97("OnePlus6TSingle", "OnePlus6T", 0, 50, 20, 0),
|
||||
model98("a5x", "Samsung Galaxy A5 (2016)", 1, 50, 45, 0),
|
||||
model99("a5y17lte", "Samsung Galaxy A5 (2017)", 1, 65, 45, 0),
|
||||
model100("a7y17lte", "Samsung Galaxy A7 (2017)", 1, 60, 40, 0),
|
||||
model101("jackpotlte", "Samsung Galaxy A8 (2018)", 1, 50, 50, 0),
|
||||
model102("a8", "Samsung Galaxy A8 / A8 (2016)", 0, 50, 15, 0),
|
||||
model103("jackpot2lte", "Samsung Galaxy A8+", 1, 50, 45, 0),
|
||||
model104("a8sqlte", "Samsung Galaxy A8s", 0, 50, 25, 0),
|
||||
model105("a8sqltechn", "Samsung Galaxy A8s", 0, 50, 25, 0),
|
||||
model106("a9xltechn", "Samsung Galaxy A9 (2016)", 1, 50, 45, 0),
|
||||
model107("c5ltechn", "Samsung Galaxy C5", 0, 45, 15, 0),
|
||||
model108("c5pltechn", "Samsung Galaxy C5", 0, 45, 15, 0),
|
||||
model109("c5proltechn", "Samsung Galaxy C5 Pro", 1, 45, 15, 0),
|
||||
model110("c7ltechn", "Samsung Galaxy C7", 0, 50, 15, 0),
|
||||
model111("c7prolte", "Samsung Galaxy C7 Pro", 1, 50, 15, 0),
|
||||
model112("c9lte", "Samsung Galaxy C9 Pro", 0, 45, 15, 0),
|
||||
model113("j5x", "Samsung Galaxy J5 (2016)", 1, 40, 50, 0),
|
||||
model114("j5y17lte", "Samsung Galaxy J5 (2017) / J5 Pro", 1, 60, 50, 0),
|
||||
model115("j6lte", "Samsung Galaxy J6", 1, 60, 50, 0),
|
||||
model116("j7y17lte", "Samsung Galaxy J7 Pro", 1, 40, 50, 0),
|
||||
model117("noblelte", "Samsung Galaxy Note5", 1, 50, 60, 0),
|
||||
model118("SCV37", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model119("SC-01K", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model120("great", "Samsung Galaxy Note8", 1, 50, 45, 0),
|
||||
model121("crownqle", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model122("crownlte", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model123("SC-01L", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model124("SCV40", "Samsung Galaxy Note9", 1, 50, 50, 0),
|
||||
model125("SC-05G", "Samsung Galaxy S6", 1, 30, 60, 0),
|
||||
model126("zeroflte", "Samsung Galaxy S6", 1, 30, 60, 0),
|
||||
model127("SCV31", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model128("404SC", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model129("SC-04G", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model130("zerolte", "Samsung Galaxy S6 edge", 1, 30, 60, 0),
|
||||
model131("zenlte", "Samsung Galaxy S6 edge+", 1, 50, 55, 0),
|
||||
model132("heroqlte", "Samsung Galaxy S7", 1, 50, 45, 0),
|
||||
model133("herolte", "Samsung Galaxy S7", 1, 50, 45, 0),
|
||||
model134("poseidonlteatt", "Samsung Galaxy S7 Active", 1, 45, 55, 0),
|
||||
model135("SCV33", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model136("SC-02H", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model137("hero2", "Samsung Galaxy S7 Edge", 1, 50, 45, 0),
|
||||
model138("SCV36", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model139("SC-02J", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model140("dreamlte", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model141("dreamqlte", "Samsung Galaxy S8", 1, 50, 55, 0),
|
||||
model142("cruiserlte", "Samsung Galaxy S8 Active", 1, 50, 50, 0),
|
||||
model143("SCV35", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model144("SC-03J", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model145("dream2", "Samsung Galaxy S8+", 1, 50, 45, 0),
|
||||
model146("SCV38", "Samsung Galaxy S9", 0, 50, 50, 0),
|
||||
model147("SC-02K", "Samsung Galaxy S9", 0, 50, 50, 0),
|
||||
model148("starlte", "Samsung Galaxy S9", 0, 50, 50, 0),
|
||||
model149("starqlte", "Samsung Galaxy S9", 0, 50, 50, 0),
|
||||
model150("SCV39", "Samsung Galaxy S9+", 0, 50, 60, 0),
|
||||
model151("SC-03K", "Samsung Galaxy S9+", 0, 50, 60, 0),
|
||||
model152("star2", "Samsung Galaxy S9+", 0, 50, 60, 0),
|
||||
model153("F331", "Sony Xperia E5", 0, 50, 25, 0),
|
||||
model154("G33", "Sony Xperia L1", 0, 50, 30, 0),
|
||||
model155("H33", "Sony Xperia L2", 0, 50, 20, 0),
|
||||
model156("H43", "Sony Xperia L2", 0, 50, 20, 0),
|
||||
model157("F512", "Sony Xperia X", 0, 10, 5, 1),
|
||||
model158("suzu", "Sony Xperia X", 0, 10, 5, 1),
|
||||
model159("F5321", "Sony Xperia X Compact", 0, 50, 55, 0),
|
||||
model160("SO-02J", "Sony Xperia X Compact", 0, 50, 55, 0),
|
||||
model161("F813", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model162("SOV33", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model163("SO-04H", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model164("502SO", "Sony Xperia X Performance", 0, 10, 5, 1),
|
||||
model165("F311", "Sony Xperia XA", 0, 50, 20, 0),
|
||||
model166("F321", "Sony Xperia XA Ultra", 0, 50, 25, 0),
|
||||
model167("G31", "Sony Xperia XA1", 0, 50, 20, 0),
|
||||
model168("G34", "Sony Xperia XA1 Plus", 0, 50, 25, 0),
|
||||
model169("G32", "Sony Xperia XA1 Ultra", 0, 50, 20, 0),
|
||||
model170("H31", "Sony Xperia XA2", 0, 50, 15, 0),
|
||||
model171("H41", "Sony Xperia XA2", 0, 50, 15, 0),
|
||||
model172("H4493", "Sony Xperia XA2 Plus", 0, 50, 20, 0),
|
||||
model173("H4413", "Sony Xperia XA2 Plus", 0, 50, 20, 0),
|
||||
model174("H3413", "Sony Xperia XA2 Plus", 0, 50, 20, 0),
|
||||
model175("H32", "Sony Xperia XA2 Ultra", 0, 50, 20, 0),
|
||||
model176("H42", "Sony Xperia XA2 Ultra", 0, 50, 20, 0),
|
||||
model177("F833", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model178("SO-01J", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model179("601SO", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model180("SOV34", "Sony Xperia XZ", 0, 20, 5, 1),
|
||||
model181("G81", "Sony Xperia XZ Premium", 0, 50, 55, 0),
|
||||
model182("SO-04J", "Sony Xperia XZ Premium", 0, 50, 55, 0),
|
||||
model183("G834", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model184("701SO", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model185("SOV36", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model186("SO-01K", "Sony Xperia XZ1", 0, 45, 5, 0),
|
||||
model187("G8441", "Sony Xperia XZ1 Compact", 0, 50, 30, 0),
|
||||
model188("SO-02K", "Sony Xperia XZ1 Compact", 0, 50, 30, 0),
|
||||
model189("H82", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model190("SOV37", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model191("SO-03K", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model192("702SO", "Sony Xperia XZ2", 0, 20, 40, 0),
|
||||
model193("H8166", "Sony Xperia XZ2 Premium", 0, 60, 20, 0),
|
||||
model194("SO-04K", "Sony Xperia XZ2 Premium", 0, 60, 20, 0),
|
||||
model195("SOV38", "Sony Xperia XZ2 Premium", 0, 60, 20, 0),
|
||||
model196("H8116", "Sony Xperia XZ2 Premium", 0, 60, 20, 0),
|
||||
model197("H8324", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model198("SO-05K", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model199("H8314", "Sony Xperia XZ2 Compact", 0, 50, 25, 0),
|
||||
model200("G823", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model201("602SO", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model202("SOV35", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model203("SO-03J", "Sony Xperia XZs", 0, 20, 5, 1),
|
||||
model204("801SO", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model205("H9493", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model206("H9436", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model207("SOV39", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model208("SO-01L", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model209("H8416", "Sony Xperia XZ3", 0, 60, 20, 0),
|
||||
model210("gemini", "Xiaomi Mi 5", 0, 40, 20, 0),
|
||||
model211("capricorn", "Xiaomi Mi 5S", 0, 50, 10, 0),
|
||||
model212("natrium", "Xiaomi Mi 5S Plus", 0, 45, 15, 0),
|
||||
model213("sagit", "Xiaomi Mi 6", 0, 50, 20, 0),
|
||||
model214("dipper", "Xiaomi Mi 8", 0, 45, 20, 0),
|
||||
model215("ursa", "Xiaomi MI 8 Explorer Edition", 0, 50, 40, 0),
|
||||
model216("lithium", "Xiaomi Mi MIX", 0, 20, 20, 0),
|
||||
model217("chiron", "Xiaomi Mi MIX 2", 0, 45, 20, 0),
|
||||
model218("polaris", "Xiaomi Mi MIX 2S", 0, 45, 20, 0),
|
||||
model219("scorpio", "Xiaomi Mi Note 2", 0, 50, 20, 0),
|
||||
model220("jason", "Xiaomi Mi Note 3", 0, 50, 20, 0),
|
||||
model221("perseus", "Xiaomi MIX 3", 0, 60, 20, 0),
|
||||
model222("bbb100", "BlackBerry KEYone", 0, 60, 20, 0),
|
||||
model223("bbf100", "BlackBerry KEY2", 0, 50, 30, 0),
|
||||
model224("CatS61", "Cat S61", 0, 50, 50, 0)
|
||||
}
|
||||
|
|
@ -492,7 +492,6 @@ public class TangemCard {
|
|||
this.UID = UID;
|
||||
}
|
||||
|
||||
|
||||
public enum Status {
|
||||
NotPersonalized(0), Empty(1), Loaded(2), Purged(3);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue