Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Feb 3, 2025
1 parent 1988218 commit 5699d1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apiServices/actionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ function postAction(req, res) {
}
// utxos must be an array of utxo objects. Not all fields have to be specified there
processedBody.utxos.forEach((utxo) => {
if (typeof utxo !== 'object' || !utxo.txid || !utxo.vout) {
if (
typeof utxo !== 'object' ||
!utxo.txid ||
(typeof utxo.vout !== 'number' && typeof utxo.vout !== 'string')
) {
throw new Error('Invalid UTXO specified');
}
if (typeof utxo.txid !== 'string' || utxo.txid.length > 200) {
Expand Down

0 comments on commit 5699d1f

Please sign in to comment.