isValidNamespaces function
Implementation
ErrorObject? isValidNamespaces(
SessionNamespaces? input,
String method,
) {
ErrorObject? error;
if (input?.isNotEmpty ?? false) {
final validActionsError = isValidNamespaceActions(input!, method);
if (validActionsError != null) {
error = validActionsError;
}
final validAccountsError = isValidNamespaceAccounts(input, method);
if (validAccountsError != null) {
error = validAccountsError;
}
} else {
error = getInternalError(
InternalErrorKey.MISSING_OR_INVALID,
context: '$method, namespaces should be an object with data',
);
}
return error;
}