Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

October #2975

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

October #2975

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
809e844
feat: Add switch to control notification #2869
bibash28 Sep 4, 2024
f1167ed
feat: Fix notification issue and make chat only custom
bibash28 Sep 5, 2024
249dcbd
Update notification room #2875
bibash28 Sep 6, 2024
5444f4f
feat: Move notification menu to differnt place #2869
bibash28 Sep 6, 2024
3c208d3
refactor: Update notification switch location #2869
bibash28 Sep 6, 2024
6c0d81e
Issue with name.firstname, cf slack
hawkbee1 Sep 10, 2024
62b6e56
feat: Consider more constrainsts for presentation #2882
bibash28 Sep 16, 2024
69017a9
feat: Consider more constrainsts for presentation #2882
bibash28 Sep 16, 2024
40050e9
version update: 2.12.6+511
bibash28 Sep 18, 2024
fd2e9c2
feat: Add switch to control notification #2869
bibash28 Sep 4, 2024
01ce905
refactor: Update notification switch location #2869
bibash28 Sep 6, 2024
f40a942
feat: Implement activity log #2895
bibash28 Oct 3, 2024
5533745
feat: Show default activity log ON #2926
bibash28 Oct 4, 2024
1d5a2c2
feat: Manage notification data #2927
bibash28 Oct 4, 2024
170dfc8
version update: 2.14.2+521
bibash28 Oct 4, 2024
58cf112
feat: Update wallet metadata for issuers #2941
bibash28 Oct 10, 2024
c62a88e
refactor: Remove wrong key in OIDC4VC settings #2953
bibash28 Oct 17, 2024
227e5bc
feat: Update wallet configuration logic #2961
bibash28 Oct 17, 2024
46fa693
refactor: Remove multiple activity log
bibash28 Oct 17, 2024
a3f80f1
feat: backup restore logic update for talao #2963
bibash28 Oct 18, 2024
41488f1
feat: Update scope setup for diip profiles #2973
bibash28 Oct 18, 2024
08e59a1
feat: Remove polygon id specific backup and restore
bibash28 Oct 18, 2024
8ef2caa
version update: 2.15.2+528
bibash28 Oct 18, 2024
251bc02
refactor: Update logic for restoration #2963
bibash28 Oct 19, 2024
d2157c7
refactor: Update popup title for replacing enterprise profile #2961
bibash28 Oct 21, 2024
4e1a1cf
refactor: Remove wrong key of EBSI #2953
bibash28 Oct 21, 2024
8d86934
fix: Show number pin code if tx code is not mentioned #2960
bibash28 Oct 21, 2024
7a04327
feat: Add litte padding if keyboard is shown for pincode #2960
bibash28 Oct 21, 2024
94022a0
feat: Backp restore profile setting for enterprise #2964
bibash28 Oct 21, 2024
261398e
feat: replace client_metadata by wallet_issuer when not EBSI V3 #2969
bibash28 Oct 21, 2024
9354a27
version update: 2.15.3+529
bibash28 Oct 21, 2024
6b4dfe0
version update: 2.15.4+530
bibash28 Oct 21, 2024
b0edff9
feat: Backup restoration wording update #2981
bibash28 Oct 22, 2024
30aa85e
refactor: Update naming convention and display recovery phrase #2982
bibash28 Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/app/shared/constants/constants_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ abstract class ConstantsJson {
'JsonWebSignature2020',
'Ed25519Signature2018',
'EcdsaSecp256k1Signature2019',
'RsaSignature2018',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should have a warning for this in vscode.

'RsaSignature2018'
],
},
'ldp_vc': {
Expand Down
27 changes: 25 additions & 2 deletions lib/app/shared/constants/parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
class Parameters {
static const int multipleCredentialsProcessDelay = 1;

// 'false' for talao
// 'true' for altme
static const bool walletHandlesCrypto = true;

static const AdvanceSettingsState defaultAdvanceSettingsState =
Expand Down Expand Up @@ -70,6 +72,7 @@ class Parameters {
chainChanged,
accountsChanged,
];

static const optionalEvents = ['message', 'disconnect', 'connect'];

static const allEvents = [...requiredEvents, ...optionalEvents];
Expand All @@ -78,29 +81,48 @@ class Parameters {
static const int maxEntries = 3;

// 'Talao'for talao
// 'Altme' for altme
static const String appName = 'Altme';

// 'false' for talao
// 'true' for altme
static const bool importAtOnboarding = true;

// false for talao
// 'true' for altme
static const bool supportDefiCompliance = true;

// false for talao
// 'true' for altme
static const bool supportCryptoAccountOwnershipInDiscoverForEnterpriseMode =
true;

// false for talao
static const bool showChainbornCard = false;
// 'true' for altme
static const bool showChainbornCard = true;

// false for talao
static const bool showTezotopiaCard = false;
// true for altme
static const bool showTezotopiaCard = true;

//'https://app.talao.co/app/download/authorize' for Talao
// 'https://app.altme.io/app/download/authorize' for altme
static const String redirectUri =
'https://app.altme.io/app/download/authorize';

//'https://app.talao.co/app/download/callback' for Talao
// 'https://app.altme.io/app/download/callback' for altme
static const String authorizationEndPoint =
'https://app.altme.io/app/download/callback';

// 'talao_wallet'for talao
// 'altme_wallet' for altme
static const String walletName = 'altme_wallet';

// 'https://app.talao.co/wallet_issuer'for talao
// 'https://app.altme.io/wallet_issuer' for altme
static const String walletIssuer = 'https://app.altme.io/wallet_issuer';

static const DidKeyType didKeyTypeForEbsiV3 = DidKeyType.ebsiv3;
static const DidKeyType didKeyTypeForEbsiV4 = DidKeyType.ebsiv4;
static const DidKeyType didKeyTypeForDefault = DidKeyType.edDSA;
Expand All @@ -114,6 +136,7 @@ class Parameters {
// static const Color seedColor = Color(0xff1EAADC);

// ThemeMode.light for talao
// 'ThemeMode.dark' for altme
static const ThemeMode defaultTheme = ThemeMode.dark;

// Used to prevent display
Expand Down
5 changes: 4 additions & 1 deletion lib/app/shared/enum/status/app_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ enum AppStatus {
idle,
goBack,
revoked,
walletProviderApproval,
addEnterpriseAccount,
updateEnterpriseAccount,
replaceEnterpriseAccount,
restoreWallet,
}
18 changes: 18 additions & 0 deletions lib/app/shared/enum/type/profile/did_key_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ extension DidKeyTypeX on DidKeyType {
}
}

String get didString {
switch (this) {
case DidKeyType.edDSA:
return 'did:key edDSA';
case DidKeyType.secp256k1:
return 'did:key secp256k1';
case DidKeyType.p256:
return 'did:key P-256';
case DidKeyType.ebsiv3:
case DidKeyType.ebsiv4:
return 'did:key EBSI P-256';
case DidKeyType.jwkP256:
return 'did:jwk P-256';
case DidKeyType.jwtClientAttestation:
return '';
}
}

String getTitle(AppLocalizations l10n) {
switch (this) {
case DidKeyType.edDSA:
Expand Down
6 changes: 2 additions & 4 deletions lib/credentials/cubit/credentials_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,9 @@ class CredentialsCubit extends Cubit<CredentialsState> {

Future<void> recoverWallet({
required List<CredentialModel> credentials,
required bool isPolygonIdCredentials,
}) async {
if (!isPolygonIdCredentials) {
await credentialsRepository.deleteAll();
}
await credentialsRepository.deleteAll();

for (final credential in credentials) {
await credentialsRepository.insert(credential);
}
Expand Down
5 changes: 5 additions & 0 deletions lib/dashboard/drawer/ssi/manage_did/view/did_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ class DidView extends StatelessWidget {
return Container();
}

/// there is no new key for EBSI V4
if (didKeyType == DidKeyType.ebsiv4) {
return Container();
}

final title = didKeyType.getTitle(l10n);
return DrawerItem(
title: title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class DidKeyTypeWidget extends StatelessWidget {
if (didKeyType == DidKeyType.jwtClientAttestation) {
return Container();
}

/// there is no new key for EBSI V4
if (didKeyType == DidKeyType.ebsiv4) {
return Container();
}

return Column(
children: [
ListTile(
Expand Down Expand Up @@ -66,7 +72,7 @@ class DidKeyTypeWidget extends StatelessWidget {
),
),
title: Text(
didKeyType.formattedString,
didKeyType.didString,
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
Expand Down
2 changes: 0 additions & 2 deletions lib/dashboard/drawer/wallet_security/backup/backup.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export 'backup_credential/backup_credential.dart';
export 'backup_mnemonic/backup_mnemonic.dart';
export 'backup_polygon_identity/backup_polygon_identity.dart';
export 'src/src.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'package:altme/activity_log/activity_log.dart';
import 'package:altme/app/app.dart';
import 'package:altme/credentials/credentials.dart';
import 'package:altme/dashboard/profile/cubit/profile_cubit.dart';
import 'package:altme/polygon_id/polygon_id.dart';

import 'package:cryptocurrency_keys/cryptocurrency_keys.dart';
Expand All @@ -24,6 +25,7 @@ class BackupCredentialCubit extends Cubit<BackupCredentialState> {
required this.fileSaver,
required this.polygonIdCubit,
required this.activityLogManager,
required this.profileCubit,
}) : super(const BackupCredentialState());

final SecureStorageProvider secureStorageProvider;
Expand All @@ -32,12 +34,11 @@ class BackupCredentialCubit extends Cubit<BackupCredentialState> {
final FileSaver fileSaver;
final PolygonIdCubit polygonIdCubit;
final ActivityLogManager activityLogManager;
final ProfileCubit profileCubit;

Future<void> encryptAndDownloadFile() async {
emit(state.loading());
await Future<void>.delayed(const Duration(milliseconds: 500));
final mnemonic =
await secureStorageProvider.get(SecureStorageKeys.ssiMnemonic);
final isPermissionStatusGranted = await getStoragePermission();

try {
Expand All @@ -58,6 +59,35 @@ class BackupCredentialCubit extends Cubit<BackupCredentialState> {
'credentials': credentialModels,
};

final profileModel = profileCubit.state.model;

if (profileModel.profileType == ProfileType.enterprise) {
final profileSetting = profileModel.profileSetting.toJson();
final email = await profileCubit.secureStorageProvider
.get(SecureStorageKeys.enterpriseEmail);

final password = await profileCubit.secureStorageProvider
.get(SecureStorageKeys.enterprisePassword);

final walletProvider = await profileCubit.secureStorageProvider
.get(SecureStorageKeys.enterpriseWalletProvider);

message['profileSetting'] = profileSetting;
message['profile'] =
profileModel.profileType.getTitle(name: 'Enterprise');

final enterprise = {
'email': email,
'password': password,
'walletProvider': walletProvider,
};

message['enterprise'] = enterprise;
}

final mnemonic =
await secureStorageProvider.get(SecureStorageKeys.ssiMnemonic);

final encrypted =
await cryptoKeys.encrypt(jsonEncode(message), mnemonic!);
final encryptedString = jsonEncode(encrypted);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:altme/activity_log/activity_log.dart';
import 'package:altme/app/app.dart';
import 'package:altme/credentials/cubit/credentials_cubit.dart';
import 'package:altme/dashboard/drawer/drawer.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:altme/onboarding/onboarding.dart';
import 'package:altme/polygon_id/polygon_id.dart';
Expand Down Expand Up @@ -34,6 +34,7 @@ class BackupCredentialPage extends StatelessWidget {
fileSaver: FileSaver.instance,
polygonIdCubit: context.read<PolygonIdCubit>(),
activityLogManager: ActivityLogManager(getSecureStorage),
profileCubit: context.read<ProfileCubit>(),
),
child: const BackupCredentialView(),
);
Expand Down Expand Up @@ -102,7 +103,9 @@ class BackupCredentialView extends StatelessWidget {
),
const SizedBox(height: Sizes.spaceXLarge),
Text(
l10n.saveBackupCredentialSubtitle,
Parameters.importAtOnboarding
? l10n.saveBackupCredentialSubtitle
: l10n.saveBackupCredentialSubtitle2,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleMedium,
),
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading