\r
/**\r
* Check which transport protocols are supported by the browser and return the\r
- * transport type according to the following priorities: Bluetooth, USB, HID.\r
+ * transport type according to the following priorities: USB, Bluetooth, HID.\r
*/\r
static get isUnsupported (): boolean {\r
console.log('Checking browser Ledger support...')\r
- if (typeof globalThis.navigator?.bluetooth?.getDevices === 'function') {\r
- this.DynamicTransport = TransportBLE\r
- return false\r
- }\r
if (typeof globalThis.navigator?.usb?.getDevices === 'function') {\r
this.DynamicTransport = TransportUSB\r
return false\r
}\r
+ if (typeof globalThis.navigator?.bluetooth?.getDevices === 'function') {\r
+ this.DynamicTransport = TransportBLE\r
+ return false\r
+ }\r
if (typeof globalThis.navigator?.hid?.getDevices === 'function') {\r
this.DynamicTransport = TransportHID\r
return false\r
}\r
\r
#accounts: AccountList\r
+ #safe: undefined\r
#status: DeviceStatus = 'DISCONNECTED'\r
get status (): DeviceStatus { return this.#status }\r
\r
Ledger.#isInternal = false\r
super('Ledger')\r
this.#accounts = new AccountList()\r
+ this.#safe = undefined\r
}\r
\r
/**\r
Wallet.#isInternal = false\r
this.#accounts = new AccountList()\r
this.#id = id ?? crypto.randomUUID()\r
- this.#safe = new WorkerQueue(type === 'Ledger' ? '' : SafeWorker)\r
+ this.#safe = new WorkerQueue(SafeWorker)\r
this.#type = type\r
}\r
\r