@@ -408,10 +408,10 @@ export class ValidatorType1 {
408
408
}
409
409
} catch ( _ ) { }
410
410
}
411
- if ( validation . parents . length !== 1 ) {
411
+ if ( validation . parents . length < 1 ) {
412
412
validation . validity = false ;
413
413
validation . waiting = false ;
414
- validation . invalidReason = "MINT transaction must have 1 valid baton parent." ;
414
+ validation . invalidReason = "MINT transaction must have at least 1 candidate baton parent input ." ;
415
415
return validation . validity ! ;
416
416
}
417
417
} else if ( slpmsg . transactionType === SlpTransactionType . SEND ) {
@@ -468,10 +468,14 @@ export class ValidatorType1 {
468
468
// Set validity validation-cache for parents, and handle MINT condition with no valid input
469
469
// we don't need to check proper token id since we only added parents with same ID in above steps.
470
470
const parentTxids = [ ...new Set ( validation . parents . map ( p => p . txid ) ) ] ;
471
- for ( let i = 0 ; i < parentTxids . length ; i ++ ) {
472
- const valid = await this . isValidSlpTxid ( { txid : parentTxids [ i ] } ) ;
473
- validation . parents . filter ( p => p . txid === parentTxids [ i ] ) . map ( p => p . valid = valid ) ;
474
- if ( validation . details ! . transactionType === SlpTransactionType . MINT && ! valid ) {
471
+ for ( const id of parentTxids ) {
472
+ const valid = await this . isValidSlpTxid ( { txid : id } ) ;
473
+ validation . parents . filter ( p => p . txid === id ) . map ( p => p . valid = valid ) ;
474
+ }
475
+
476
+ // Check MINT for exactly 1 valid MINT baton
477
+ if ( validation . details ! . transactionType === SlpTransactionType . MINT ) {
478
+ if ( validation . parents . filter ( p => p . valid && p . inputQty === null ) . length !== 1 ) {
475
479
validation . validity = false ;
476
480
validation . waiting = false ;
477
481
validation . invalidReason = "MINT transaction with invalid baton parent." ;
0 commit comments