Browse Source

Fix double catch

master
Thibaut Boustany 7 years ago
parent
commit
81e5ba3a42
No known key found for this signature in database GPG Key ID: 32475B11A2B13EEC
  1. 4
      src/helpers/deviceAccess.js

4
src/helpers/deviceAccess.js

@ -40,7 +40,9 @@ export const withDevice: WithDevice = devicePath => job => {
busy = true
refreshBusyUIState()
try {
const t = await retry(() => TransportNodeHid.open(devicePath), { maxRetry: 1 }).catch(mapError).catch(mapError)
const t = await retry(() => TransportNodeHid.open(devicePath), { maxRetry: 1 }).catch(
mapError,
)
t.setDebugMode(logger.apdu)
try {
const res = await job(t).catch(mapError)

Loading…
Cancel
Save