]> git.codecow.com Git - libnemo.git/commitdiff
Fix Ledger constructor.
authorChris Duncan <chris@zoso.dev>
Thu, 14 Aug 2025 20:55:21 +0000 (13:55 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 14 Aug 2025 20:55:21 +0000 (13:55 -0700)
src/lib/wallet/index.ts

index f7439559066d4ec56d508123659987e0739516a7..16bbb357c5a05421aa2ae043ef575566bd886b6d 100644 (file)
@@ -143,7 +143,7 @@ export class Wallet {
 \r
        constructor (type: WalletType, id?: string)\r
        constructor (type: unknown, id?: string) {\r
-               if (!Wallet.#isInternal) {\r
+               if (!Wallet.#isInternal && type !== 'Ledger') {\r
                        throw new Error(`Wallet cannot be instantiated directly. Use 'await Wallet.create()' instead.`)\r
                }\r
                if (type !== 'BIP-44' && type !== 'BLAKE2b' && type !== 'Ledger') {\r