]> git.codecow.com Git - libnemo.git/commitdiff
Use own API and remove redundant call.
authorChris Duncan <chris@zoso.dev>
Sat, 16 May 2026 07:44:30 +0000 (00:44 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 16 May 2026 07:44:30 +0000 (00:44 -0700)
src/lib/ledger/index.ts

index 12e8779cd760610297b2c8aed328cce891db9323..73a0805607af0f73f2661d0aa013d8114bea675e 100644 (file)
@@ -394,10 +394,9 @@ export class Ledger {
                                .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')
                        }