fromDeprecatedAccounts static method
The policy the deprecated authenticateAs list stands for: the first
account it names that can sign, and nobody when none can.
Implementation
static AuthPolicy? fromDeprecatedAccounts(List<Account>? accounts) {
if (accounts == null || accounts.isEmpty) {
return null;
}
for (final account in accounts) {
if (account.signer.canSign()) {
return AuthPolicy.allow(account);
}
}
return const AuthPolicy.never();
}