Skip to content

Commit

Permalink
feat: Remove Domain Request notification from Drawer #1941
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Sep 28, 2023
1 parent b0ebd08 commit b5bfc37
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 33 deletions.
1 change: 0 additions & 1 deletion lib/app/shared/constants/secure_storage_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SecureStorageKeys {
static const String isWalletIntegrityEnabled = 'isWalletIntegrityEnabled';
static const String isBiometricEnabled = 'fingerprintEnabled';

static const String alertEnabled = 'alertEnabled';
static const String userConsentForIssuerAccess = 'userConsentForIssuerAccess';
static const String userConsentForVerifierAccess =
'userConsentForVerifierAccess';
Expand Down
15 changes: 0 additions & 15 deletions lib/dashboard/profile/cubit/profile_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ class ProfileCubit extends Cubit<ProfileState> {
.get(SecureStorageKeys.isBiometricEnabled)) ==
'true';

final alertValue =
await secureStorageProvider.get(SecureStorageKeys.alertEnabled);
final isAlertEnabled = alertValue == null || alertValue == 'true';

final userConsentForIssuerAccess = (await secureStorageProvider
.get(SecureStorageKeys.userConsentForIssuerAccess)) ==
'true';
Expand Down Expand Up @@ -134,7 +130,6 @@ class ProfileCubit extends Cubit<ProfileState> {
jobTitle: jobTitle,
isEnterprise: isEnterprise,
isBiometricEnabled: isBiometricEnabled,
isAlertEnabled: isAlertEnabled,
userConsentForIssuerAccess: userConsentForIssuerAccess,
userConsentForVerifierAccess: userConsentForVerifierAccess,
userPINCodeForAuthentication: userPINCodeForAuthentication,
Expand Down Expand Up @@ -216,11 +211,6 @@ class ProfileCubit extends Cubit<ProfileState> {
profileModel.isBiometricEnabled.toString(),
);

await secureStorageProvider.set(
SecureStorageKeys.alertEnabled,
profileModel.isAlertEnabled.toString(),
);

await secureStorageProvider.set(
SecureStorageKeys.userConsentForIssuerAccess,
profileModel.userConsentForIssuerAccess.toString(),
Expand Down Expand Up @@ -274,11 +264,6 @@ class ProfileCubit extends Cubit<ProfileState> {
await update(profileModel);
}

Future<void> setAlertEnabled({bool enabled = false}) async {
final profileModel = state.model.copyWith(isAlertEnabled: enabled);
await update(profileModel);
}

Future<void> setUserConsentForIssuerAccess({bool enabled = false}) async {
final profileModel =
state.model.copyWith(userConsentForIssuerAccess: enabled);
Expand Down
6 changes: 0 additions & 6 deletions lib/dashboard/profile/models/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class ProfileModel extends Equatable {
required this.tezosNetwork,
required this.isEnterprise,
required this.isBiometricEnabled,
required this.isAlertEnabled,
required this.userConsentForIssuerAccess,
required this.userConsentForVerifierAccess,
required this.userPINCodeForAuthentication,
Expand All @@ -42,7 +41,6 @@ class ProfileModel extends Equatable {
polygonIdNetwork: PolygonIdNetwork.PolygonMainnet.toString(),
isEnterprise: false,
isBiometricEnabled: false,
isAlertEnabled: false,
userConsentForIssuerAccess: true,
userConsentForVerifierAccess: true,
userPINCodeForAuthentication: true,
Expand All @@ -63,7 +61,6 @@ class ProfileModel extends Equatable {
final TezosNetwork tezosNetwork;
final bool isEnterprise;
final bool isBiometricEnabled;
final bool isAlertEnabled;
final bool userConsentForIssuerAccess;
final bool userConsentForVerifierAccess;
final bool userPINCodeForAuthentication;
Expand All @@ -85,7 +82,6 @@ class ProfileModel extends Equatable {
jobTitle,
isEnterprise,
isBiometricEnabled,
isAlertEnabled,
userConsentForIssuerAccess,
userConsentForVerifierAccess,
userPINCodeForAuthentication,
Expand All @@ -108,7 +104,6 @@ class ProfileModel extends Equatable {
TezosNetwork? tezosNetwork,
bool? isEnterprise,
bool? isBiometricEnabled,
bool? isAlertEnabled,
bool? userConsentForIssuerAccess,
bool? userConsentForVerifierAccess,
bool? userPINCodeForAuthentication,
Expand All @@ -128,7 +123,6 @@ class ProfileModel extends Equatable {
tezosNetwork: tezosNetwork ?? this.tezosNetwork,
isEnterprise: isEnterprise ?? this.isEnterprise,
isBiometricEnabled: isBiometricEnabled ?? this.isBiometricEnabled,
isAlertEnabled: isAlertEnabled ?? this.isAlertEnabled,
userConsentForIssuerAccess:
userConsentForIssuerAccess ?? this.userConsentForIssuerAccess,
userConsentForVerifierAccess:
Expand Down
3 changes: 1 addition & 2 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,7 @@
"ebsi": "EBSI",
"backupPolygonIdIdentity": "Backup PolygonId Identity",
"restorePolygonIdCredentials": "Restore PolygonId Credentials",
"comingSoon": "Coming Soon",
"alert": "Domain request notification",
"comingSoon": "Coming Soon",
"financeCredentialsHomeTitle": "My financial credentials",
"financeCredentialsDiscoverTitle": "Get verified financial credentials",
"financeCredentialsDiscoverSubtitle": "Access new investment opportunities in web3.",
Expand Down
4 changes: 0 additions & 4 deletions lib/l10n/untranslated.json
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@
"backupPolygonIdIdentity",
"restorePolygonIdCredentials",
"comingSoon",
"alert",
"financeCredentialsHomeTitle",
"financeCredentialsDiscoverTitle",
"financeCredentialsDiscoverSubtitle",
Expand Down Expand Up @@ -1659,7 +1658,6 @@
"backupPolygonIdIdentity",
"restorePolygonIdCredentials",
"comingSoon",
"alert",
"financeCredentialsHomeTitle",
"financeCredentialsDiscoverTitle",
"financeCredentialsDiscoverSubtitle",
Expand Down Expand Up @@ -1832,7 +1830,6 @@
"backupPolygonIdIdentity",
"restorePolygonIdCredentials",
"comingSoon",
"alert",
"financeCredentialsHomeTitle",
"financeCredentialsDiscoverTitle",
"financeCredentialsDiscoverSubtitle",
Expand Down Expand Up @@ -2702,7 +2699,6 @@
"backupPolygonIdIdentity",
"restorePolygonIdCredentials",
"comingSoon",
"alert",
"financeCredentialsHomeTitle",
"financeCredentialsDiscoverTitle",
"financeCredentialsDiscoverSubtitle",
Expand Down
8 changes: 3 additions & 5 deletions lib/splash/bloclisteners/blocklisteners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,13 @@ final qrCodeBlocListener = BlocListener<QRCodeScanCubit, QRCodeScanState>(
var acceptHost = true;
final approvedIssuer = Issuer.emptyIssuer(state.uri!.host);

final bool isAlertEnable = profileCubit.state.model.isAlertEnabled;
final bool userConsentForIssuerAccess =
profileCubit.state.model.userConsentForIssuerAccess;
final bool userConsentForVerifierAccess =
profileCubit.state.model.userConsentForVerifierAccess;

bool showPrompt = isAlertEnable ||
userConsentForIssuerAccess ||
userConsentForVerifierAccess;
bool showPrompt =
userConsentForIssuerAccess || userConsentForVerifierAccess;

final OIDC4VCType? currentOIIDC4VCTypeForIssuance =
await getOIDC4VCTypeForIssuance(
Expand All @@ -251,7 +249,7 @@ final qrCodeBlocListener = BlocListener<QRCodeScanCubit, QRCodeScanState>(
}
} else {
/// normal Case
if (!isAlertEnable) showPrompt = false;
if (!userConsentForIssuerAccess) showPrompt = false;
}

if (showPrompt) {
Expand Down

0 comments on commit b5bfc37

Please sign in to comment.