Skip to content

Commit

Permalink
Merge branch 'main' into ebsi_nft
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Aug 31, 2023
2 parents 2c0b5b7 + 1dac209 commit e9dabab
Show file tree
Hide file tree
Showing 36 changed files with 66 additions and 144 deletions.
4 changes: 2 additions & 2 deletions .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.10.6",
"flutterSdkVersion": "3.13.2",
"flavors": {}
}
}
3 changes: 0 additions & 3 deletions lib/app/shared/constants/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class Urls {
static const String checkIssuerTalaoUrl =
'https://talao.co/trusted-issuers-registry/v1/issuers';

// TODO(all): update the issuer url for polygon
static const String checkIssuerPolygonTestnetUrl =
'https://issuer-demo.polygonid.me/';
static const String checkIssuerPolygonUrl = 'checkIssuerPolygonUrl';
Expand Down Expand Up @@ -91,15 +90,13 @@ class Urls {
static const objktUrl = 'https://objkt.com/';
static const raribleUrl = 'https://rarible.com/';

// TODO(all): remember to update all below urls.
static const String bunnyPassCardUrl = 'https://issuer.tezotopia.altme.io';
static const String dogamiPassCardUrl = 'https://issuer.tezotopia.altme.io';
static const String matterlightPassCardUrl =
'https://issuer.tezotopia.altme.io';
static const String pigsPassCardUrl = 'https://issuer.tezotopia.altme.io';
static const String trooperzPassCardUrl = 'https://issuer.tezotopia.altme.io';

//
static const over13AIValidationUrl = 'https://issuer.talao.co/ai/over13';
static const over15AIValidationUrl = 'https://issuer.talao.co/ai/over15';
static const over18AIValidationUrl = 'https://issuer.talao.co/ai/over18';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ enum ResponseString {
RESPONSE_STRING_successfullyGeneratingProof,
RESPONSE_STRING_pleaseAddXtoConnectToTheDapp,
RESPONSE_STRING_pleaseSwitchPolygonNetwork,
RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile,
RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile,
RESPONSE_STRING_authenticationSuccess,
RESPONSE_STRING_youcanSelectOnlyXCredential,
}
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ extension ResponseStringX on ResponseString {
injectedMessage ?? '',
);

case ResponseString.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile:
case ResponseString.RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile:
return globalMessage
.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile;

Expand Down
3 changes: 1 addition & 2 deletions lib/app/shared/helper_functions/helper_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Future<bool> getStoragePermission() async {
if (await Permission.storage.request().isGranted) {
return true;
} else if (await Permission.storage.request().isPermanentlyDenied) {
// TODO(all): show dialog to choose this option
await openAppSettings();
} else if (await Permission.storage.request().isDenied) {
return false;
Expand Down Expand Up @@ -330,7 +329,7 @@ String getSignatureType(String circuitId) {
return '';
}

String separateUppercaseWords(String input) {
String splitUppercase(String input) {
final regex = RegExp('(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])');
return input.split(regex).join(' ');
}
Expand Down
4 changes: 2 additions & 2 deletions lib/app/shared/message_handler/response_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,9 @@ class ResponseMessage with MessageHandler {
injectedMessage: injectedMessage,
);

case ResponseString.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile:
case ResponseString.RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile:
return ResponseString
.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile.localise(
.RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile.localise(
context,
);

Expand Down
3 changes: 2 additions & 1 deletion lib/app/shared/widget/base/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ class _BasePageState extends State<BasePage> with WidgetsBindingObserver {
secureApplicationController.lock();
}

case AppLifecycleState.hidden:
case AppLifecycleState.detached:
break;
// TODO: Handle this case.
// TODO(all): Handle this case.
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/chat_room/matrix_chat/matrix_chat_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class MatrixChatImpl extends MatrixChatInterface {
try {
for (final eventId in eventIds) {
if (eventId != null) {
await room.postReceipt(eventId);
await room.setReadMarker(eventId);
}
}
} catch (e, s) {
Expand Down
2 changes: 1 addition & 1 deletion lib/credentials/cubit/credentials_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class CredentialsCubit extends Cubit<CredentialsState> {
// TODO(all): Handle this case.
break;
case CredentialCategory.polygonidCards:
// TODO: Handle this case.
// TODO(all): Handle this case.
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,69 +134,6 @@ class ConfirmConnectionView extends StatelessWidget {
textAlign: TextAlign.center,
),
const SizedBox(height: Sizes.spaceNormal),
// Text(
// walletConnectCubit.state.sessionProposalEvent!.params
// .generatedNamespaces!
// .toString(),
// ),
// ListView.builder(
// itemCount: walletConnectCubit
// .state
// .sessionProposalEvent!
// .params
// .requiredNamespaces
// .length,
// shrinkWrap: true,
// physics: const ScrollPhysics(),
// itemBuilder: (context, i) {
// final key = walletConnectCubit
// .state
// .sessionProposalEvent!
// .params
// .requiredNamespaces
// .keys
// .elementAt(i);

// final RequiredNamespace ns = walletConnectCubit
// .state
// .sessionProposalEvent!
// .params
// .requiredNamespaces[key]!;

// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text('$key : '),
// if (ns.chains != null) ...[
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// const Text('Chains'),
// Text(ns.chains!.toString()),
// ],
// ),
// const SizedBox(height: Sizes.spaceSmall),
// ],
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// const Text('Methods'),
// Text(ns.methods.toString()),
// ],
// ),
// const SizedBox(height: Sizes.spaceSmall),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// const Text('Events'),
// Text(ns.events.toString()),
// ],
// ),
// const SizedBox(height: Sizes.spaceSmall),
// ],
// );
// },
// )
],
SelectAccount(connectionBridgeType: connectionBridgeType),
const SizedBox(height: Sizes.spaceNormal),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class OperationCubit extends Cubit<OperationState> {
final String? gasLimit = operationDetail.gasLimit;
final String? fee = operationDetail.fee;

if (operationDetail.kind == Kinds.origination) {
if (operationDetail.kind == OperationKind.origination) {
final String balance = operationDetail.amount ?? '0';
final List<Map<String, dynamic>> code = operationDetail.code!;
final dynamic storage = operationDetail.storage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _SoftwareLicenseViewState extends State<SoftwareLicenseView> {
Expanded(
child: Text(
'${state.licenses[index].title} '
'(${state.licenses[index].description.length})',
'${state.licenses[index].description.length}',
style: Theme.of(context).textTheme.bodyMedium,
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/dashboard/drawer/ssi/manage_did/manage_did.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export 'view/did_ebsi_v2/did_ebsi_v2_private_key_page.dart';
export 'view/did_ebsi_v2/manage_did_ebsi_v2_page.dart';
export 'view/did_ebsi_v3/did_ebsi_v3_private_key_page.dart';
export 'view/did_ebsi_v3/manage_did_ebsi_v3_page.dart';
export 'view/did_edDSA/did_edDSA_private_key_page.dart';
export 'view/did_edDSA/manage_did_edDSA_page.dart';
export 'view/did_edDSA/did_ed_dsa_private_key_page.dart';
export 'view/did_edDSA/manage_did_ed_dsa_page.dart';
export 'view/did_polygon_id/manage_did_polygon_id_page.dart';
export 'view/did_secp256k1/did_secp256k1_private_key_page.dart';
export 'view/did_secp256k1/manage_did_secp256k1_page.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class WalletSecurityView extends StatelessWidget {
builder: (context) => ConfirmDialog(
title: l10n.biometricsNotSupported,
subtitle: l10n
.yourDeviceDoseNotSupportBiometricsAuthentication, // ignore: lines_longer_than_80_chars
.deviceDoNotSupportBiometricsAuthentication, // ignore: lines_longer_than_80_chars
yes: l10n.ok,
),
);
Expand Down Expand Up @@ -175,7 +175,8 @@ class WalletSecurityView extends StatelessWidget {
await context
.read<ProfileCubit>()
.setUserConsentForVerifierAccess(
enabled: value);
enabled: value,
);
},
value: state.model.userConsentForVerifierAccess,
activeColor: Theme.of(context).colorScheme.primary,
Expand All @@ -191,7 +192,8 @@ class WalletSecurityView extends StatelessWidget {
await context
.read<ProfileCubit>()
.setUserPINCodeForAuthentication(
enabled: value);
enabled: value,
);
},
value: state.model.userPINCodeForAuthentication,
activeColor: Theme.of(context).colorScheme.primary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,6 @@ class _PolygonIdVerificationViewState extends State<PolygonIdVerificationView> {
.copyWith(color: const Color(0xffD1CCE3)),
),
const SizedBox(height: 10),
// Text(
// 'Allowed issuers: ${proofScopeRequest.query.allowedIssuers}',
// textAlign: TextAlign.center,
// ),
// const SizedBox(height: 10),
// Text(
// 'Proof type: $proofTypeMsg',
// textAlign: TextAlign.start,
// ),
// const SizedBox(height: 10),
Divider(color: Colors.grey.withOpacity(0.25)),
if (state.claimEntities!.isNotEmpty &&
state.claimEntities![index] == null) ...[
Expand Down Expand Up @@ -246,7 +236,7 @@ class _PolygonIdVerificationViewState extends State<PolygonIdVerificationView> {
children: [
Expanded(
child: Text(
'${l10n.from} ${separateUppercaseWords(
'${l10n.from} ${splitUppercase(
proofScopeRequest.query.type!,
)}',
textAlign: TextAlign.start,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:math';

import 'package:altme/app/shared/shared.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:credential_manifest/credential_manifest.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:altme/l10n/l10n.dart';
import 'package:altme/pin_code/pin_code.dart';
import 'package:altme/scan/cubit/scan_cubit.dart';
import 'package:altme/theme/theme.dart';
import 'package:altme/wallet/wallet.dart';
import 'package:credential_manifest/credential_manifest.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/theme/app_theme/app_theme.dart';
import 'package:credential_manifest/credential_manifest.dart';
import 'package:flutter/material.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {
message: StateMessage.error(
messageHandler: ResponseMessage(
ResponseString
.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile,
.RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile,
),
showDialog: false,
duration: const Duration(seconds: 20),
Expand Down
6 changes: 3 additions & 3 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
"yourPinCodeChangedSuccessfully": "Your pin code changed successfully",
"advantagesCards": "Advantages cards",
"advantagesDiscoverCards": "Unlock exclusive rewards",
"identityCards": "Identity cards",
"identityCards": "Identity cards",
"identityDiscoverCards": "Simplify ID verification",
"contactInfoCredentials": "Contact information",
"contactInfoDiscoverCredentials": "Verify your contact information",
Expand Down Expand Up @@ -353,7 +353,7 @@
"termsOfUse": "Terms of Use & Confidentiality",
"scanFingerprintToAuthenticate": "Scan Fingerprint to Authenticate",
"biometricsNotSupported": "Biometrics not supported",
"yourDeviceDoseNotSupportBiometricsAuthentication": "Your device dose not supports biometrics authentication",
"deviceDoNotSupportBiometricsAuthentication": "Your device dose not supports biometrics authentication",
"biometricsEnabledMessage": "You can now unlock app with your biometrics.",
"biometricsDisabledMessage": "Your biometrics has been disabled.",
"exportSecretKey": "Export secret key",
Expand Down Expand Up @@ -560,7 +560,7 @@
"advantagesCredentialHomeSubtitle": "Benefit from exclusive advantages in Web3",
"advantagesCredentialDiscoverSubtitle": "Discover loyalty cards and exclusive passes",
"identityCredentialHomeSubtitle": "Prove things about yourself while protecting your data",
"identityCredentialDiscoverSubtitle": "Get reusable KYC and age verification credentials",
"identityCredentialDiscoverSubtitle": "Get reusable KYC and age verification credentials",
"myProfessionalCredentialDiscoverSubtitle": "Use your professional cards securely",
"blockchainAccountsCredentialHomeSubtitle": "Prove your blockchain accounts ownership",
"educationCredentialHomeSubtitle": "Prove your education background instantly",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/arb/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
"termsOfUse": "Conditions d'utilisation et confidentialité",
"scanFingerprintToAuthenticate": "Scanner l'empreinte digitale pour s'authentifier",
"biometricsNotSupported": "La biométrie n'est pas prise en charge",
"yourDeviceDoseNotSupportBiometricsAuthentication": "Votre appareil ne prend pas en charge l'authentification biométrique",
"deviceDoNotSupportBiometricsAuthentication": "Votre appareil ne prend pas en charge l'authentification biométrique",
"biometricsEnabledMessage": "Vous pouvez maintenant déverrouiller l'application avec vos données biométriques.",
"biometricsDisabledMessage": "Votre biométrie a été désactivée.",
"exportSecretKey": "Exporter la clé secrète",
Expand Down
6 changes: 3 additions & 3 deletions lib/l10n/untranslated.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
"termsOfUse",
"scanFingerprintToAuthenticate",
"biometricsNotSupported",
"yourDeviceDoseNotSupportBiometricsAuthentication",
"deviceDoNotSupportBiometricsAuthentication",
"biometricsEnabledMessage",
"biometricsDisabledMessage",
"exportSecretKey",
Expand Down Expand Up @@ -1154,7 +1154,7 @@
"termsOfUse",
"scanFingerprintToAuthenticate",
"biometricsNotSupported",
"yourDeviceDoseNotSupportBiometricsAuthentication",
"deviceDoNotSupportBiometricsAuthentication",
"biometricsEnabledMessage",
"biometricsDisabledMessage",
"exportSecretKey",
Expand Down Expand Up @@ -2159,7 +2159,7 @@
"termsOfUse",
"scanFingerprintToAuthenticate",
"biometricsNotSupported",
"yourDeviceDoseNotSupportBiometricsAuthentication",
"deviceDoNotSupportBiometricsAuthentication",
"biometricsEnabledMessage",
"biometricsDisabledMessage",
"exportSecretKey",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class ActivateBiometricsView extends StatelessWidget {
context: context,
builder: (context) => ConfirmDialog(
title: l10n.biometricsNotSupported,
subtitle: l10n
.yourDeviceDoseNotSupportBiometricsAuthentication,
subtitle:
l10n.deviceDoNotSupportBiometricsAuthentication,
yes: l10n.ok,
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/scan/cubit/scan_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class ScanCubit extends Cubit<ScanState> {
message: StateMessage.error(
messageHandler: ResponseMessage(
ResponseString
.RESPONSE_STRING_pleaseSwitchToCorrectOIDC4VCProfile,
.RESPONSE_STRING_pleaseSwitchToRightOIDC4VCProfile,
),
showDialog: false,
duration: const Duration(seconds: 20),
Expand Down
2 changes: 0 additions & 2 deletions lib/splash/bloclisteners/blocklisteners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:altme/connection_bridge/connection_bridge.dart';
import 'package:altme/credentials/cubit/credentials_cubit.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:altme/oidc4vc/oidc4vc.dart';
import 'package:altme/onboarding/cubit/onboarding_cubit.dart';
import 'package:altme/onboarding/onboarding.dart';
import 'package:altme/pin_code/pin_code.dart';
Expand All @@ -19,7 +18,6 @@ import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:jwt_decode/jwt_decode.dart';
import 'package:polygonid/polygonid.dart';

final splashBlocListener = BlocListener<SplashCubit, SplashState>(
Expand Down
Loading

0 comments on commit e9dabab

Please sign in to comment.