diff --git a/package-lock.json b/package-lock.json index 79ece81..93795eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bitcoinerlab/descriptors", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bitcoinerlab/descriptors", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "dependencies": { "@bitcoinerlab/miniscript": "^1.2.1", diff --git a/package.json b/package.json index 740a37f..0933382 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@bitcoinerlab/descriptors", "description": "This library parses and creates Bitcoin Miniscript Descriptors and generates Partially Signed Bitcoin Transactions (PSBTs). It provides PSBT finalizers and signers for single-signature, BIP32 and Hardware Wallets.", "homepage": "https://github.com/bitcoinerlab/descriptors", - "version": "2.0.0", + "version": "2.0.1", "author": "Jose-Luis Landabaso", "license": "MIT", "repository": { diff --git a/src/scriptExpressions.ts b/src/scriptExpressions.ts index 3d85d82..b946c78 100644 --- a/src/scriptExpressions.ts +++ b/src/scriptExpressions.ts @@ -134,7 +134,7 @@ function standardExpressionsLedgerMaker( ledgerClient, ledgerState, ledgerManager, - network = networks.bitcoin, + network, account, keyPath, change, @@ -143,7 +143,6 @@ function standardExpressionsLedgerMaker( ledgerClient?: unknown; ledgerState?: LedgerState; ledgerManager?: LedgerManager; - /** @default networks.bitcoin */ network?: Network; account: number; keyPath?: string; @@ -154,6 +153,7 @@ function standardExpressionsLedgerMaker( throw new Error(`ledgerClient and ledgerState have been deprecated`); if (ledgerManager && network) throw new Error(`ledgerManager already includes the network object`); + if (!ledgerManager && !network) network = networks.bitcoin; if (ledgerManager) ({ ledgerClient, ledgerState, network } = ledgerManager); if (!ledgerClient || !ledgerState) throw new Error(`Could not retrieve ledgerClient or ledgerState`);