Skip to content

Commit

Permalink
feat: Add VerifiableId in Profile EBSI in the Discover #2611
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Apr 22, 2024
1 parent 67c659b commit 084326a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
VCFormatType.ldpVc,
VCFormatType.jwtVcJson,
VCFormatType.vcSdJWT,
VCFormatType.jwtVc,
];

case CredentialSubjectType.identityCredential:
Expand Down Expand Up @@ -899,6 +900,8 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {

if (vcFormatType == VCFormatType.vcSdJWT) {
type = 'identitycredential';
} else if (vcFormatType == VCFormatType.jwtVc) {
type = 'individualverifiableattestation';
}

link = '${Urls.id360Url}'
Expand Down
3 changes: 2 additions & 1 deletion lib/credentials/cubit/credentials_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,8 @@ class CredentialsCubit extends Cubit<CredentialsState> {
final displayVerifiableId = vcFormatType == VCFormatType.ldpVc &&
discoverCardsOptions.displayVerifiableId;
final displayVerifiableIdJwt =
vcFormatType == VCFormatType.jwtVcJson &&
(vcFormatType == VCFormatType.jwtVc ||
vcFormatType == VCFormatType.jwtVcJson) &&
discoverCardsOptions.displayVerifiableIdJwt;
final displayVerifiableIdSdJwt =
vcFormatType == VCFormatType.vcSdJWT &&
Expand Down
24 changes: 23 additions & 1 deletion lib/dashboard/profile/models/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,29 @@ class ProfileModel extends Equatable {
blockchainOptions: BlockchainOptions.initial(),
generalOptions: GeneralOptions.empty(),
helpCenterOptions: HelpCenterOptions.initial(),
discoverCardsOptions: DiscoverCardsOptions.none(),
discoverCardsOptions: const DiscoverCardsOptions(
displayDefi: false,
displayHumanity: false,
displayHumanityJwt: false,
displayOver13: false,
displayOver15: false,
displayOver18: false,
displayOver18Jwt: false,
displayOver21: false,
displayOver50: false,
displayChainborn: false,
displayTezotopia: false,
displayVerifiableId: false,
displayVerifiableIdJwt: true,
displayOver65: false,
displayEmailPass: false,
displayEmailPassJwt: false,
displayPhonePass: false,
displayPhonePassJwt: false,
displayAgeRange: false,
displayGender: false,
displayExternalIssuer: [],
),
selfSovereignIdentityOptions: SelfSovereignIdentityOptions(
displayManageDecentralizedId: true,
customOidc4vcProfile: CustomOidc4VcProfile(
Expand Down

0 comments on commit 084326a

Please sign in to comment.