From b5bfc37c1fb68f26131ac7bebadaf380c21f6ce7 Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Thu, 28 Sep 2023 16:32:09 +0545 Subject: [PATCH] feat: Remove Domain Request notification from Drawer #1941 --- lib/app/shared/constants/secure_storage_keys.dart | 1 - lib/dashboard/profile/cubit/profile_cubit.dart | 15 --------------- lib/dashboard/profile/models/profile.dart | 6 ------ lib/l10n/arb/app_en.arb | 3 +-- lib/l10n/untranslated.json | 4 ---- lib/splash/bloclisteners/blocklisteners.dart | 8 +++----- 6 files changed, 4 insertions(+), 33 deletions(-) diff --git a/lib/app/shared/constants/secure_storage_keys.dart b/lib/app/shared/constants/secure_storage_keys.dart index 15aa6f0ee..7b10754a3 100644 --- a/lib/app/shared/constants/secure_storage_keys.dart +++ b/lib/app/shared/constants/secure_storage_keys.dart @@ -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'; diff --git a/lib/dashboard/profile/cubit/profile_cubit.dart b/lib/dashboard/profile/cubit/profile_cubit.dart index 7625def18..1e309f39c 100644 --- a/lib/dashboard/profile/cubit/profile_cubit.dart +++ b/lib/dashboard/profile/cubit/profile_cubit.dart @@ -90,10 +90,6 @@ class ProfileCubit extends Cubit { .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'; @@ -134,7 +130,6 @@ class ProfileCubit extends Cubit { jobTitle: jobTitle, isEnterprise: isEnterprise, isBiometricEnabled: isBiometricEnabled, - isAlertEnabled: isAlertEnabled, userConsentForIssuerAccess: userConsentForIssuerAccess, userConsentForVerifierAccess: userConsentForVerifierAccess, userPINCodeForAuthentication: userPINCodeForAuthentication, @@ -216,11 +211,6 @@ class ProfileCubit extends Cubit { profileModel.isBiometricEnabled.toString(), ); - await secureStorageProvider.set( - SecureStorageKeys.alertEnabled, - profileModel.isAlertEnabled.toString(), - ); - await secureStorageProvider.set( SecureStorageKeys.userConsentForIssuerAccess, profileModel.userConsentForIssuerAccess.toString(), @@ -274,11 +264,6 @@ class ProfileCubit extends Cubit { await update(profileModel); } - Future setAlertEnabled({bool enabled = false}) async { - final profileModel = state.model.copyWith(isAlertEnabled: enabled); - await update(profileModel); - } - Future setUserConsentForIssuerAccess({bool enabled = false}) async { final profileModel = state.model.copyWith(userConsentForIssuerAccess: enabled); diff --git a/lib/dashboard/profile/models/profile.dart b/lib/dashboard/profile/models/profile.dart index f5f3c1ff4..24f1d3741 100644 --- a/lib/dashboard/profile/models/profile.dart +++ b/lib/dashboard/profile/models/profile.dart @@ -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, @@ -42,7 +41,6 @@ class ProfileModel extends Equatable { polygonIdNetwork: PolygonIdNetwork.PolygonMainnet.toString(), isEnterprise: false, isBiometricEnabled: false, - isAlertEnabled: false, userConsentForIssuerAccess: true, userConsentForVerifierAccess: true, userPINCodeForAuthentication: true, @@ -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; @@ -85,7 +82,6 @@ class ProfileModel extends Equatable { jobTitle, isEnterprise, isBiometricEnabled, - isAlertEnabled, userConsentForIssuerAccess, userConsentForVerifierAccess, userPINCodeForAuthentication, @@ -108,7 +104,6 @@ class ProfileModel extends Equatable { TezosNetwork? tezosNetwork, bool? isEnterprise, bool? isBiometricEnabled, - bool? isAlertEnabled, bool? userConsentForIssuerAccess, bool? userConsentForVerifierAccess, bool? userPINCodeForAuthentication, @@ -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: diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 8bbcc6966..eb2fe7ab2 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -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.", diff --git a/lib/l10n/untranslated.json b/lib/l10n/untranslated.json index e7b0576b6..dc60694eb 100644 --- a/lib/l10n/untranslated.json +++ b/lib/l10n/untranslated.json @@ -789,7 +789,6 @@ "backupPolygonIdIdentity", "restorePolygonIdCredentials", "comingSoon", - "alert", "financeCredentialsHomeTitle", "financeCredentialsDiscoverTitle", "financeCredentialsDiscoverSubtitle", @@ -1659,7 +1658,6 @@ "backupPolygonIdIdentity", "restorePolygonIdCredentials", "comingSoon", - "alert", "financeCredentialsHomeTitle", "financeCredentialsDiscoverTitle", "financeCredentialsDiscoverSubtitle", @@ -1832,7 +1830,6 @@ "backupPolygonIdIdentity", "restorePolygonIdCredentials", "comingSoon", - "alert", "financeCredentialsHomeTitle", "financeCredentialsDiscoverTitle", "financeCredentialsDiscoverSubtitle", @@ -2702,7 +2699,6 @@ "backupPolygonIdIdentity", "restorePolygonIdCredentials", "comingSoon", - "alert", "financeCredentialsHomeTitle", "financeCredentialsDiscoverTitle", "financeCredentialsDiscoverSubtitle", diff --git a/lib/splash/bloclisteners/blocklisteners.dart b/lib/splash/bloclisteners/blocklisteners.dart index 0b668e8f6..0e12d923c 100644 --- a/lib/splash/bloclisteners/blocklisteners.dart +++ b/lib/splash/bloclisteners/blocklisteners.dart @@ -217,15 +217,13 @@ final qrCodeBlocListener = BlocListener( 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( @@ -251,7 +249,7 @@ final qrCodeBlocListener = BlocListener( } } else { /// normal Case - if (!isAlertEnable) showPrompt = false; + if (!userConsentForIssuerAccess) showPrompt = false; } if (showPrompt) {