revert: partial code

This commit is contained in:
septs 2025-02-26 21:50:22 +08:00
parent 13092ee37a
commit 2f18605470
Signed by: septs
SSH key fingerprint: SHA256:ElK0p6DNkbsqYUdJ3I9QHDVf21SQD0c2r+hd7s/r5Co

View file

@ -17,10 +17,10 @@ interface ApduInterface {
*/
val valid: Boolean
fun <T> withLogicalChannel(aid: ByteArray, callback: ((ByteArray) -> ByteArray) -> T): T {
fun <T> withLogicalChannel(aid: ByteArray, cb: ((ByteArray) -> ByteArray) -> T): T {
val handle = logicalChannelOpen(aid)
return try {
callback { tx -> transmit(handle, tx) }
cb { transmit(handle, it) }
} finally {
logicalChannelClose(handle)
}