Skip to content

Commit

Permalink
feat: Update display message for status list signature failure #2549
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Apr 4, 2024
1 parent 3ce5039 commit b6d0b74
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/app/shared/enum/status/credential_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ enum CredentialStatus {
active,
expired,
invalidSignature,
statusListInvalidSignature,
invalidStatus,
unknown,
noStatus,
Expand Down
4 changes: 4 additions & 0 deletions lib/app/shared/extension/credential_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ extension CredentialStatusExtension on CredentialStatus {
return l10n.unknown;
case CredentialStatus.invalidStatus:
return l10n.statusIsInvalid;
case CredentialStatus.statusListInvalidSignature:
return l10n.statuslListSignatureFailed;
case CredentialStatus.noStatus:
return '';
}
Expand All @@ -33,6 +35,7 @@ extension CredentialStatusExtension on CredentialStatus {
case CredentialStatus.pending:
case CredentialStatus.unknown:
case CredentialStatus.invalidSignature:
case CredentialStatus.statusListInvalidSignature:
case CredentialStatus.noStatus:
return Icons.circle_outlined;
}
Expand All @@ -47,6 +50,7 @@ extension CredentialStatusExtension on CredentialStatus {
case CredentialStatus.pending:
case CredentialStatus.unknown:
case CredentialStatus.invalidSignature:
case CredentialStatus.statusListInvalidSignature:
case CredentialStatus.noStatus:
return Theme.of(context).colorScheme.inactiveColor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ class CredentialDetailsCubit extends Cubit<CredentialDetailsState> {
// revoked
emit(
state.copyWith(
credentialStatus: CredentialStatus.invalidStatus,
credentialStatus:
CredentialStatus.statusListInvalidSignature,
status: AppStatus.idle,
),
);
Expand Down
9 changes: 5 additions & 4 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,9 @@
"phoneLanguage": "Phone language",
"pushAuthorizationRequestTitle": "Push Authorization Request (PAR)",
"pushAuthorizationRequestSubTitle": "Default: false\nEnable to secure the authorization code flow",
"cardIsValid":"Card is valid",
"cardIsExpired":"Card is expired",
"signatureIsInvalid":"Signature is invalid",
"statusIsInvalid":"Status is invalid"
"cardIsValid": "Card is valid",
"cardIsExpired": "Card is expired",
"signatureIsInvalid": "Signature is invalid",
"statusIsInvalid": "Status is invalid",
"statuslListSignatureFailed": "Status list signature failed"
}
9 changes: 6 additions & 3 deletions lib/l10n/untranslated.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"cardIsValid",
"cardIsExpired",
"signatureIsInvalid",
"statusIsInvalid"
"statusIsInvalid",
"statuslListSignatureFailed"
],

"es": [
Expand All @@ -34,7 +35,8 @@
"cardIsValid",
"cardIsExpired",
"signatureIsInvalid",
"statusIsInvalid"
"statusIsInvalid",
"statuslListSignatureFailed"
],

"fr": [
Expand All @@ -43,6 +45,7 @@
"cardIsValid",
"cardIsExpired",
"signatureIsInvalid",
"statusIsInvalid"
"statusIsInvalid",
"statuslListSignatureFailed"
]
}

0 comments on commit b6d0b74

Please sign in to comment.