UsbApduInterface: Implement validity check
All checks were successful
/ build-debug (push) Successful in 4m13s

This commit is contained in:
Peter Cai 2024-07-01 19:59:23 -04:00
parent 09a8db330b
commit 960fa6743a

View file

@ -95,7 +95,7 @@ class UsbApduInterface(
}
override val valid: Boolean
get() = true
get() = channelId != -1
private fun isSuccessResponse(resp: ByteArray): Boolean =
resp.size >= 2 && resp[resp.size - 2] == 0x90.toByte() && resp[resp.size - 1] == 0x00.toByte()