]> git.codecow.com Git - libnemo.git/commitdiff
Publicize ledger support getter again so it can be used in test flow control.
authorChris Duncan <chris@zoso.dev>
Mon, 11 Aug 2025 15:26:41 +0000 (08:26 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 11 Aug 2025 15:26:41 +0000 (08:26 -0700)
src/lib/wallet/ledger.ts
src/types.d.ts

index b337bb9d1153508a8d92be7792853950f1baf2ee..4378c24c9b04ba95a370d29334c1f33201e12ec7 100644 (file)
@@ -62,7 +62,7 @@ export class Ledger extends Wallet {
        * Check which transport protocols are supported by the browser and return the\r
        * transport type according to the following priorities: USB, Bluetooth, HID.\r
        */\r
-       static get #isUnsupported (): boolean {\r
+       static get isUnsupported (): boolean {\r
                console.log('Checking browser Ledger support...')\r
                if (typeof globalThis.navigator?.usb?.getDevices === 'function') {\r
                        this.DynamicTransport = TransportUSB\r
@@ -87,7 +87,7 @@ export class Ledger extends Wallet {
        */\r
        static async create (): Promise<Ledger> {\r
                try {\r
-                       if (this.#isUnsupported) throw new Error('Browser is unsupported')\r
+                       if (this.isUnsupported) throw new Error('Browser is unsupported')\r
                        this.#isInternal = true\r
                        const self = new this()\r
                        await Database.add({ [self.id]: { id: self.id, type: 'Ledger' } }, Wallet.DB_NAME)\r
index 1a96520cbc523ef82c50f49a2328c7f10d296ff3..6ac21e56802c2bcc3960dd0f5a7e500c3c1c6d54 100644 (file)
@@ -740,6 +740,11 @@ export declare class Ledger extends Wallet {
        static DynamicTransport: typeof TransportBLE | typeof TransportUSB | typeof TransportHID
        static SYMBOL: Symbol
        /**
+       * Check which transport protocols are supported by the browser and return the
+       * transport type according to the following priorities: USB, Bluetooth, HID.
+       */
+       static get isUnsupported (): boolean
+       /**
        * Creates a new Ledger hardware wallet communication layer by dynamically
        * importing the ledger.js service.
        *