Generate address on else and spend validators; uses title

This commit is contained in:
Riley-Kilgore
2024-09-24 07:29:45 -07:00
committed by Lucas
parent 7c6f3278ba
commit 92f5bf529f

View File

@@ -476,8 +476,10 @@ where
blueprint.with_validator(title, when_too_many, when_missing, |validator| { blueprint.with_validator(title, when_too_many, when_missing, |validator| {
// Make sure we're not calculating the address for a minting validator // Make sure we're not calculating the address for a minting validator
if validator.datum.is_none() { if let Some(title) = title {
return Err(blueprint::error::Error::UnexpectedMintingValidator.into()); if !title.ends_with("else") && !title.ends_with("spend") {
return Err(blueprint::error::Error::UnexpectedMintingValidator.into());
}
} }
let n = validator.parameters.len(); let n = validator.parameters.len();