isValidRelays function

bool isValidRelays(
  1. List<RelayerProtocolOptions>? input,
  2. bool optional
)

Implementation

bool isValidRelays(
  List<RelayerProtocolOptions>? input,
  bool optional,
) {
  bool valid = false;

  if (optional && (input?.isEmpty ?? true)) {
    valid = true;
  } else if (input?.isNotEmpty ?? false) {
    input!.forEach((relay) {
      valid = isValidRelay(relay);
    });
  }

  return valid;
}