Updated on 2026-08-14

This commit is contained in:
Tangem 2018-12-18 18:33:57 +03:00
parent cfebd18d17
commit f8b2a70086
11 changed files with 101 additions and 87 deletions

View file

@ -284,18 +284,14 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
public override fun onPause() {
nfcManager.onPause()
if (readCardInfoTask != null) {
readCardInfoTask!!.cancel(true)
}
readCardInfoTask?.cancel(true)
super.onPause()
}
public override fun onStop() {
// dismiss enable NFC dialog
nfcManager.onStop()
if (readCardInfoTask != null) {
readCardInfoTask!!.cancel(true)
}
readCardInfoTask?.cancel(true)
super.onStop()
}
@ -329,7 +325,8 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
val ctx = TangemContext(card)
when {
card.status == TangemCard.Status.Loaded -> lastTag?.let {
val engineCoin = CoinEngineFactory.create(ctx) ?: throw CardProtocol.TangemException("Can't create CoinEngine!")
val engineCoin = CoinEngineFactory.create(ctx)
?: throw CardProtocol.TangemException("Can't create CoinEngine!")
engineCoin.defineWallet()
//mCard.setWallet(Blockchain.calculateWalletAddress(mCard, pkUncompressed));