From: Chris Duncan Date: Thu, 14 Aug 2025 20:55:21 +0000 (-0700) Subject: Fix Ledger constructor. X-Git-Tag: v0.10.5~41^2~94 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=170d0798c40003d9e12dd52afa622b206ca9020a;p=libnemo.git Fix Ledger constructor. --- diff --git a/src/lib/wallet/index.ts b/src/lib/wallet/index.ts index f743955..16bbb35 100644 --- a/src/lib/wallet/index.ts +++ b/src/lib/wallet/index.ts @@ -143,7 +143,7 @@ export class Wallet { constructor (type: WalletType, id?: string) constructor (type: unknown, id?: string) { - if (!Wallet.#isInternal) { + if (!Wallet.#isInternal && type !== 'Ledger') { throw new Error(`Wallet cannot be instantiated directly. Use 'await Wallet.create()' instead.`) } if (type !== 'BIP-44' && type !== 'BLAKE2b' && type !== 'Ledger') {