From e52f5be496eb36ce40a45555ba4928fae9b764dd Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 10 Sep 2025 15:22:02 -0700 Subject: [PATCH] Prioritize HID over USB. Current Ledger firmware is having issues communicating over WebUSB. WebHID is a different tech stack, and Ledger recommends using it first and foremost, so reorder priority of transports. --- src/lib/wallet/ledger.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/wallet/ledger.ts b/src/lib/wallet/ledger.ts index 9b64960..af7b93f 100644 --- a/src/lib/wallet/ledger.ts +++ b/src/lib/wallet/ledger.ts @@ -54,7 +54,7 @@ export class Ledger { 0x9000: 'OK' }) - static DynamicTransport: typeof TransportBLE | typeof TransportUSB | typeof TransportHID + static DynamicTransport: typeof TransportHID | typeof TransportBLE | typeof TransportUSB static UsbVendorId = ledgerUSBVendorId static SYMBOL: Symbol = Symbol('Ledger') @@ -64,16 +64,16 @@ export class Ledger { */ static get isUnsupported (): boolean { console.log('Checking browser Ledger support...') - if (typeof globalThis.navigator?.usb?.getDevices === 'function') { - this.DynamicTransport = TransportUSB + if (typeof globalThis.navigator?.hid?.getDevices === 'function') { + this.DynamicTransport = TransportHID return false } if (typeof globalThis.navigator?.bluetooth?.getDevices === 'function') { this.DynamicTransport = TransportBLE return false } - if (typeof globalThis.navigator?.hid?.getDevices === 'function') { - this.DynamicTransport = TransportHID + if (typeof globalThis.navigator?.usb?.getDevices === 'function') { + this.DynamicTransport = TransportUSB return false } return true -- 2.47.3