Browse Source

fix error throwing when exchanging apdus

master
Valentin D. Pinkman 7 years ago
parent
commit
49f9548f33
No known key found for this signature in database GPG Key ID: E7D110669FFB8D3E
  1. 2
      src/helpers/socket.js

2
src/helpers/socket.js

@ -74,7 +74,9 @@ export const createDeviceSocket = (transport: Transport<*>, url: string) =>
for (const apdu of data) {
const r: Buffer = await transport.exchange(Buffer.from(apdu, 'hex'))
lastStatus = r.slice(r.length - 2)
if (lastStatus.toString('hex') !== '9000') break
}
if (!lastStatus) {
throw new DeviceSocketNoBulkStatus()
}

Loading…
Cancel
Save