Skip to content

Commit

Permalink
fix: correct txo validation in getDescriptor and bump version
Browse files Browse the repository at this point in the history
- Fixed txo validation to correctly handle cases with two or three parts
- Bumped version to 1.2.4
  • Loading branch information
landabaso committed Jun 28, 2024
1 parent a2dbc02 commit e23c652
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@bitcoinerlab/discovery",
"description": "A TypeScript library for retrieving Bitcoin funds from ranged descriptors, leveraging @bitcoinerlab/explorer for standardized access to multiple blockchain explorers.",
"homepage": "https://github.com/bitcoinerlab/discovery",
"version": "1.2.3",
"version": "1.2.4",
"author": "Jose-Luis Landabaso",
"license": "MIT",
"prettier": "@bitcoinerlab/configs/prettierConfig.json",
Expand Down
2 changes: 1 addition & 1 deletion src/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ export function DiscoveryFactory(
const split = txo.split(':');
if (utxo && split.length !== 2)
throw new Error(`Error: invalid utxo: ${utxo}`);
if (!utxo && split.length !== 3)
if (!utxo && split.length !== 2 && split.length !== 3)
throw new Error(`Error: invalid txo: ${txo}`);
const txId = split[0];
if (!txId) throw new Error(`Error: invalid txo: ${txo}`);
Expand Down

0 comments on commit e23c652

Please sign in to comment.