Skip to content

Commit

Permalink
feat: Disable chainborn and tezotpia card for Altme #2535
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Apr 4, 2024
1 parent 6a2514b commit 3ce5039
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
3 changes: 3 additions & 0 deletions lib/app/shared/constants/parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class Parameters {
static const bool supportCryptoAccountOwnershipInDiscoverForEnterpriseMode =
true;

static const bool showChainbornCard = false;
static const bool showTezotopiaCard = false;

static const DidKeyType didKeyTypeForEbsiV3 = DidKeyType.ebsiv3;
static const DidKeyType didKeyTypeForDefault = DidKeyType.edDSA;
static const DidKeyType didKeyTypeForDutch = DidKeyType.jwkP256;
Expand Down
29 changes: 17 additions & 12 deletions lib/credentials/cubit/credentials_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -751,19 +751,24 @@ class CredentialsCubit extends Cubit<CredentialsState> {
allSubjectTypeForCategory.add(CredentialSubjectType.gender);
}
case CredentialCategory.advantagesCards:
if (discoverCardsOptions.displayChainborn &&
!allSubjectTypeForCategory
.contains(CredentialSubjectType.chainbornMembership)) {
allSubjectTypeForCategory.add(
CredentialSubjectType.chainbornMembership,
);
if (Parameters.showChainbornCard) {
if (discoverCardsOptions.displayChainborn &&
!allSubjectTypeForCategory
.contains(CredentialSubjectType.chainbornMembership)) {
allSubjectTypeForCategory.add(
CredentialSubjectType.chainbornMembership,
);
}
}
if (discoverCardsOptions.displayTezotopia &&
!allSubjectTypeForCategory
.contains(CredentialSubjectType.tezotopiaMembership)) {
allSubjectTypeForCategory.add(
CredentialSubjectType.tezotopiaMembership,
);

if (Parameters.showTezotopiaCard) {
if (discoverCardsOptions.displayTezotopia &&
!allSubjectTypeForCategory
.contains(CredentialSubjectType.tezotopiaMembership)) {
allSubjectTypeForCategory.add(
CredentialSubjectType.tezotopiaMembership,
);
}
}

case CredentialCategory.professionalCards:
Expand Down

0 comments on commit 3ce5039

Please sign in to comment.