Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async listenForLedger () {
if (this.listeningForLedger) {
return
}
this.listeningForLedger = true
this.transport = await LedgerTransport.create()
this.ledger = new ArkLedger(this.transport)
this.listeningForLedger = false
}
export const listenDevices = (): * =>
getEnv('EXPERIMENTAL_USB')
? Observable.create(TransportNodeHidSingleton.listen)
: Observable.create(TransportNodeHid.listen)
() =>
getEnv('EXPERIMENTAL_USB')
? TransportNodeHidSingleton.open()
: TransportNodeHid.open(devicePath),
{ maxRetry: 4 },