Browse Source

Merge pull request #695 from valpinkman/fix/error-in-ws

fix error throwing when exchanging apdus
master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
0355a22431
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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