validateBytesLength static method
Validate address length.
Implementation
static void validateBytesLength(
List<int> addr,
int lenExp, {
int? minLength,
}) {
if ((minLength != null && addr.length < minLength) ||
(minLength == null && addr.length != lenExp)) {
throw AddressConverterException.addressValidationFailed(
reason: "Invalid address length.",
);
}
}