File tree Expand file tree Collapse file tree
packages/common/lib/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ export function getSupportedCredentials(opts?: {
1818 types ?: string [ ] [ ] ;
1919 format ?: OID4VCICredentialFormat | string | ( OID4VCICredentialFormat | string ) [ ] ;
2020} ) : Record < string , CredentialConfigurationSupportedV1_0_13 > | Array < CredentialConfigurationSupported > {
21- const { version = OpenId4VCIVersion . VER_1_0_13 , types} = opts ?? { }
21+ const { version = OpenId4VCIVersion . VER_1_0_13 , types } = opts ?? { } ;
2222 if ( types && Array . isArray ( types ) ) {
2323 if ( version < OpenId4VCIVersion . VER_1_0_13 ) {
24- return types . flatMap ( typeSet => getSupportedCredential ( { ...opts , version, types : typeSet } ) as Array < CredentialConfigurationSupported > ) ;
24+ return types . flatMap ( ( typeSet ) => getSupportedCredential ( { ...opts , version, types : typeSet } ) as Array < CredentialConfigurationSupported > ) ;
2525 } else {
2626 return types
2727 . map ( ( typeSet ) => {
@@ -51,7 +51,7 @@ export function getSupportedCredential(opts?: {
5151 let credentialConfigurationsV11 : Array < CredentialConfigurationSupported > | undefined = undefined ;
5252 let credentialConfigurationsV13 : Record < string , CredentialConfigurationSupportedV1_0_13 > | undefined = undefined ;
5353 if ( version < OpenId4VCIVersion . VER_1_0_12 || issuerMetadata ?. credentials_supported ) {
54- credentialConfigurationsV11 = issuerMetadata ?. credential_supported ?? [ ] ;
54+ credentialConfigurationsV11 = ( issuerMetadata ?. credentials_supported as Array < CredentialConfigurationSupported > ) ?? [ ] ;
5555 } else {
5656 credentialConfigurationsV13 =
5757 ( issuerMetadata ?. credential_configurations_supported as Record < string , CredentialConfigurationSupportedV1_0_13 > ) ?? { } ;
You can’t perform that action at this time.
0 commit comments