diff --git a/src/WalletFramework.Oid4Vc/Oid4Vp/PresentationExchange/Models/InputDescriptor.cs b/src/WalletFramework.Oid4Vc/Oid4Vp/PresentationExchange/Models/InputDescriptor.cs index b85bd6fd..cdff21e7 100644 --- a/src/WalletFramework.Oid4Vc/Oid4Vp/PresentationExchange/Models/InputDescriptor.cs +++ b/src/WalletFramework.Oid4Vc/Oid4Vp/PresentationExchange/Models/InputDescriptor.cs @@ -156,9 +156,17 @@ public static Option> GetRequestedCredentialType(this InputD .Select>(field => { return DocType.ValidDoctype(field.Filter!.Const!).UnwrapOrThrow(); - }); + }) + .ToList(); - result = types?.ToList() ?? []; + if (types == null || !types.Any()) + { + types = DocType.ValidDoctype(inputDescriptor.Id).Match( + docType => [docType], + _ => new List>()); + } + + result = types; } return result.Count != 0 ? result[0] : Option>.None;