.some(device => device.vendorId === this.ledgerVendorId)
const isUsbPaired = (await navigator.usb?.getDevices?.() ?? [])
.some(device => device.vendorId === this.ledgerVendorId)
- if (this.#transport === TransportHID && isHidPaired) {
- await _connect(this.#transport)
- } else if (this.#transport === TransportUSB && isUsbPaired) {
- await _connect(this.#transport)
+ if ((this.#transport === TransportHID && isHidPaired)
+ || (this.#transport === TransportUSB && isUsbPaired)) {
+ await this.connect()
} else {
this.#setStatus('DISCONNECTED')
}