Updated on 2026-08-14

This commit is contained in:
Tangem 2020-06-08 10:17:04 +03:00
parent 300e100a23
commit 5b418812bb

View file

@ -10,6 +10,7 @@ import com.tangem.common.apdu.CommandApdu
import com.tangem.common.apdu.ResponseApdu
import com.tangem.common.extensions.toHexString
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.cancel
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
@ -60,7 +61,7 @@ class NfcReader : CardReader {
override fun stopSession(cancelled: Boolean) {
nfcTag = null
listener?.readingIsActive = false
//TODO: send user cancelled if (cancelled)
if (cancelled) scope?.cancel()
}
override suspend fun transceiveApdu(apdu: CommandApdu): CompletionResult<ResponseApdu> =