Skip to content

Commit

Permalink
fix lenght whitelistedAddresses logic
Browse files Browse the repository at this point in the history
  • Loading branch information
albertorizzi committed Aug 19, 2024
1 parent cde09a8 commit e7614ec
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions validators/feetank.ak
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,16 @@ validator {

Withdraw -> must_be_signed_by(ctx.transaction, datum.tankOwner)

ScheduledTransaction(whitelistedAddresses) ->
list.any(
whitelistedAddresses,
fn(addr) { must_be_signed_by(ctx.transaction, addr) },
)
ScheduledTransaction(whitelistedAddresses) -> and {
list.length(whitelistedAddresses) > 0,
list.any(
whitelistedAddresses,
fn(addr) { must_be_signed_by(ctx.transaction, addr) },
),
}
}

// Controlla se almeno uno è firmato
_ -> False
}
}
Expand Down

0 comments on commit e7614ec

Please sign in to comment.