File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/hardware-ledger/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { Cip30DataSignature } from '@cardano-sdk/dapp-connector';
3131import { HID } from 'node-hid' ;
3232import { HexBlob , areNumbersEqualInConstantTime , areStringsEqualInConstantTime } from '@cardano-sdk/util' ;
3333import { LedgerDevice , LedgerTransportType } from './types' ;
34+ import { getFirstLedgerDevice } from '@ledgerhq/hw-transport-webusb/lib/webusb' ;
3435import { str_to_path } from '@cardano-foundation/ledgerjs-hw-app-cardano/dist/utils/address' ;
3536import { toLedgerTx } from './transformers' ;
3637import TransportNodeHid from '@ledgerhq/hw-transport-node-hid-noevents' ;
@@ -410,7 +411,7 @@ export class LedgerKeyAgent extends KeyAgentBase {
410411 transport =
411412 communicationType === CommunicationType . Node
412413 ? await TransportNodeHid . open ( nodeHidDevicePath )
413- : await TransportWebUSB . request ( ) ;
414+ : await TransportWebUSB . open ( await getFirstLedgerDevice ( ) ) ;
414415 } catch ( error ) {
415416 throw new errors . TransportError ( 'Creating transport failed' , error ) ;
416417 }
@@ -496,6 +497,7 @@ export class LedgerKeyAgent extends KeyAgentBase {
496497 nodeHidDevicePath ,
497498 device
498499 ) ;
500+
499501 if ( matchingOpenConnection ) return matchingOpenConnection ;
500502
501503 let transport : LedgerTransportType | undefined ;
You can’t perform that action at this time.
0 commit comments