Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Use new USB device detection from ledgerjs #1340

Merged
merged 12 commits into from
Jul 31, 2018

Conversation

MortalKastor
Copy link
Contributor

@MortalKastor MortalKastor commented Jul 31, 2018

Type

Performance improvement

Context

LedgerHQ/ledgerjs#191

Parts of the app affected

Device detection

@MortalKastor MortalKastor added the HODL for PRs: this is blocked, we can't merge yet label Jul 31, 2018
@@ -39,7 +40,7 @@ export const withDevice: WithDevice = devicePath => job => {
busy = true
refreshBusyUIState()
try {
const t = await TransportNodeHid.open(devicePath).catch(mapError)
const t = await retry(() => TransportNodeHid.open(devicePath), { maxRetry: 1 }).catch(mapError).catch(mapError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is double catch intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, it's safer.

@meriadec
Copy link
Member

I think we'll need

apt-get install -y libudev-dev

on CI config (see here)

@gre gre removed the HODL for PRs: this is blocked, we can't merge yet label Jul 31, 2018
@meriadec
Copy link
Member

Tested on Linux and I had to put maxRetry: 2 in withDevice to avoid displaying the error (and stop pinging)

@MortalKastor MortalKastor merged commit 70498f4 into LedgerHQ:develop Jul 31, 2018
@MortalKastor MortalKastor deleted the usb-detect branch August 21, 2018 16:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants