Skip to content

Commit

Permalink
feat: Ignore sd value verification #3146
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Dec 3, 2024
1 parent 148a730 commit 264b9e1
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,25 @@ class CredentialDetailsCubit extends Cubit<CredentialDetailsState> {
final listOfSd = collectSdValues(data);

if (claims != null && listOfSd.isNotEmpty) {
final selectiveDisclosure = SelectiveDisclosure(item);
final decryptedDatas = selectiveDisclosure.contents;

/// check if sd already contain sh256 hash
for (final element in decryptedDatas) {
final sh256Hash = profileCubit.oidc4vc.sh256HashOfContent(element);

if (!listOfSd.contains(sh256Hash)) {
emit(
state.copyWith(
credentialStatus: CredentialStatus.invalidSignature,
status: AppStatus.idle,
statusListIndex: statusListIndex,
statusListUrl: statusListUri,
),
);
return;
}
}
// final selectiveDisclosure = SelectiveDisclosure(item);
// final decryptedDatas = selectiveDisclosure.contents;

// /// check if sd already contain sh256 hash
// for (final element in decryptedDatas) {
// final sh256Hash = profileCubit.oidc4vc.sh256HashOfContent(element);

// if (!listOfSd.contains(sh256Hash)) {
// emit(
// state.copyWith(
// credentialStatus: CredentialStatus.invalidSignature,
// status: AppStatus.idle,
// statusListIndex: statusListIndex,
// statusListUrl: statusListUri,
// ),
// );
// return;
// }
// }

/// check the status
final status = item.data['status'];
Expand Down

0 comments on commit 264b9e1

Please sign in to comment.