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
1 changed files with 4 additions and 2 deletions

View File

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