diff --git a/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart b/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart index 2302114cc..6aba11146 100644 --- a/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart +++ b/lib/app/shared/enum/type/credential_subject_type/credential_subject_type_extension.dart @@ -754,6 +754,16 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { final oidc4vcDraftType = profileSetting .selfSovereignIdentityOptions.customOidc4vcProfile.oidc4vciDraft; + final discoverCardsOptions = profileSetting.discoverCardsOptions; + + var format = VCFormatType.ldpVc.urlValue; + + if (vcFormatType == VCFormatType.auto && discoverCardsOptions != null) { + format = discoverCardsOptions.vcFormatTypeForAuto; + } else { + format = vcFormatType.urlValue; + } + switch (this) { case CredentialSubjectType.defiCompliance: image = ImageStrings.dummyDefiComplianceCard; @@ -793,7 +803,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.emailPassUrl}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}'; + '&format=$format'; whyGetThisCard = ResponseString.RESPONSE_STRING_emailPassWhyGetThisCard; expirationDateDetails = @@ -805,7 +815,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over13'; whyGetThisCard = ResponseString.RESPONSE_STRING_over13WhyGetThisCard; @@ -818,7 +828,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over15'; whyGetThisCard = ResponseString.RESPONSE_STRING_over15WhyGetThisCard; @@ -831,7 +841,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over18'; whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; @@ -844,7 +854,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over21'; whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; @@ -857,7 +867,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over50'; whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; @@ -870,7 +880,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=over65'; whyGetThisCard = ResponseString.RESPONSE_STRING_over18WhyGetThisCard; @@ -916,7 +926,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=$type'; whyGetThisCard = @@ -963,7 +973,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.phonePassUrl}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}'; + '&format=$format'; whyGetThisCard = ResponseString.RESPONSE_STRING_phoneProofWhyGetThisCard; @@ -976,7 +986,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType { link = '${Urls.id360Url}' '?draft=${oidc4vcDraftType.numbering}' - '&format=${vcFormatType.urlValue}' + '&format=$format' '&type=liveness'; whyGetThisCard = diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/helpers/get_credentials_from_filter_list.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/helpers/get_credentials_from_filter_list.dart index a4a3d11c8..95cafaac7 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/helpers/get_credentials_from_filter_list.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/helpers/get_credentials_from_filter_list.dart @@ -62,6 +62,8 @@ List getCredentialsFromFilterList({ /// a valid candidate if (searchList.isNotEmpty) { selectedCredential.add(credential); + } else { + break; } } } diff --git a/lib/dashboard/profile/models/profile_setting.dart b/lib/dashboard/profile/models/profile_setting.dart index 28c0d8aef..5cf6b002c 100644 --- a/lib/dashboard/profile/models/profile_setting.dart +++ b/lib/dashboard/profile/models/profile_setting.dart @@ -315,6 +315,33 @@ class DiscoverCardsOptions extends Equatable { ); } + String get vcFormatTypeForAuto { + if (displayDefi || + displayEmailPass || + displayGender || + displayHumanity || + displayOver13 || + displayOver15 || + displayOver18 || + displayOver21 || + displayOver50 || + displayOver65 || + displayPhonePass || + displayVerifiableId) { + return VCFormatType.ldpVc.urlValue; + } else if (displayPhonePassJwt || + displayOver18Jwt || + displayEmailPassJwt || + displayVerifiableIdJwt || + displayHumanityJwt) { + return VCFormatType.jwtVcJson.urlValue; + } else if (displayVerifiableIdSdJwt) { + return VCFormatType.vcSdJWT.urlValue; + } + + return VCFormatType.ldpVc.urlValue; + } + @override List get props => [ displayDefi, diff --git a/packages/key_generator/pubspec.yaml b/packages/key_generator/pubspec.yaml index af9c836c8..6344dc4d5 100644 --- a/packages/key_generator/pubspec.yaml +++ b/packages/key_generator/pubspec.yaml @@ -13,12 +13,12 @@ dependencies: dart_web3: ^0.0.3 ed25519_hd_key: ^2.2.0 hex: ^0.2.0 - pinenacl: ^0.3.3 + pinenacl: ^0.6.0 secp256k1: ^0.3.0 tezart: git: url: https://github.com/autonomy-system/tezart.git - ref: 7534512ff7c874251e5b1e1a426f5822a3837b51 + ref: 85070e8ddafe5140c0bfd2cb9d569ecf986e7234 dev_dependencies: flutter_test: diff --git a/packages/oidc4vc/pubspec.yaml b/packages/oidc4vc/pubspec.yaml index b1115d1dc..ed0ffad4a 100644 --- a/packages/oidc4vc/pubspec.yaml +++ b/packages/oidc4vc/pubspec.yaml @@ -29,18 +29,18 @@ dependencies: jose_plus: ^0.4.5 json_annotation: ^4.8.1 json_path: ^0.7.2 #latest version creates test issue + pinenacl: ^0.6.0 secp256k1: ^0.3.0 secure_storage: path: ../secure_storage tezart: git: url: https://github.com/autonomy-system/tezart.git - ref: 7534512ff7c874251e5b1e1a426f5822a3837b51 + ref: 85070e8ddafe5140c0bfd2cb9d569ecf986e7234 uuid: ^3.0.7 dependency_overrides: ffi: 2.1.0 #didkit from path which depends on ffi ^1.0.0 - pinenacl: ^0.5.1 # tezart from git depends on pinenacl ^0.3.3 dev_dependencies: build_runner: ^2.4.4 diff --git a/pubspec.lock b/pubspec.lock index c0b2d382e..4b68c14a6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -651,10 +651,10 @@ packages: dependency: "direct main" description: name: dio - sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.7.0" dio_cache_interceptor: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 848b2c524..0166979f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,7 @@ name: altme description: AltMe Flutter App -version: 2.12.5+510 - +version: 2.12.6+511 publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: @@ -108,7 +107,7 @@ dependencies: tezart: git: url: https://github.com/autonomy-system/tezart.git - ref: 7534512ff7c874251e5b1e1a426f5822a3837b51 + ref: 85070e8ddafe5140c0bfd2cb9d569ecf986e7234 timezone: ^0.9.2 url_launcher: ^6.1.11 visibility_detector: ^0.4.0+2 @@ -128,7 +127,6 @@ dependency_overrides: pointycastle: ^3.7.4 #polygonid from path requires pointycastle 3.7.3 uuid: ^3.0.7 #web3dart >=2.7.2 depends on uuid ^4.0.0 web3dart: ^2.5.1 #alletconnect_flutter_v2 >=2.2.2-beta01 depends on web3dart ^2.7.3 - dev_dependencies: bloc_test: ^9.1.2