diff --git a/src/slp/tokentype1.js b/src/slp/tokentype1.js index bb88f6d..26b26d9 100644 --- a/src/slp/tokentype1.js +++ b/src/slp/tokentype1.js @@ -375,6 +375,9 @@ class TokenType1 { if (!Array.isArray(tokenUtxos)) { throw new Error('tokenUtxos must be an array.') } + if (!mintQty) { + throw new Error('mintQty must be a positive number.') + } // Loop through the tokenUtxos array and find the minting baton. let mintBatonUtxo @@ -404,6 +407,8 @@ class TokenType1 { baseQty = Math.floor(baseQty) baseQty = baseQty.toString() + if (isNaN(baseQty)) throw new Error('baseQty is non a number!') + // Signal that the baton should be passed or detroyed. let batonVout = 2 if (destroyBaton) batonVout = null