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 RelayAuth? fromDeprecatedAccounts(List<Account>? accounts) {
if (accounts == null || accounts.isEmpty) {
return null;
}
for (final account in accounts) {
if (account.signer.canSign()) {
return RelayAuth.allow(account);
}
}
return const RelayAuth.never();
}