Skip to content

Commit

Permalink
October (#2821)
Browse files Browse the repository at this point in the history
* fix: Update account name instantly #2667

* linter update

* feat: Add green color for card valid status #2764

* color adjustment

* fix: Update display issue of sd selections #2777

* feat: Update ebsi logo to make light theme compatible #2775

* feat: Use english for oidc4vc screen #2696

* version update to 2.9.1+470

* fix: Avoid double scan to get and present #2668

* fix: Force user to delete account if wallet is suspended #2759

* version update to 2.9.2+471

* fix: Close app if wallet attestation is revoked #2759

* refactor: Remove linkedIn credential contents #2683

* refactor: Remove reward check and display #2682

* feat: Manage blockchain options from portal #2780

* version update to 2.9.3+472

* feat: Use verification method from didkit for EVM #2637 #2638

* fix:Update status display #2783

* refactor: Add place to add image #2771

* version update to 2.9.4+473

* fix: Fetch uri for image but not working and indication of deleted message #2771

* refactor: Update sub value for cypto account ownership card #2609

* feat: Add all type of VCs #2779

* feat: Support all types presentaton wth VCFormat auto #2779

* verson update to 2.9.5+474

* feat: Use engish lang for profile list for all lang #2786

* refactor: Rename dutch into diipv2point1

* feat: Rename owf baseline profile into diipv3 #2784

* feat: Update logo for diip profiles #2785

* feat: Show all the issuer in discover for auto vc format #2787

* Update test

* feat: No jwt test for redirect_uri scheme and handle sd selection for auto #2790

* version update to 2.9.6+475

* feat: Disble wallet attestation card when dev mode is off #2789

* fix: Solve presentation issue for Test 13 when vc format is auto #2791

* fix: Solve json path issue for string numerals #2792

* remove old comment

* version update: 2.9.7+476

* fix: Solve uncheck issue #2792

* refactor: Make font bold for sd-jwt display #2797

* fix: Change the text color so that it is readable in light mode #2795

* feat: Implement display data for dummy cards #2799

* feat: Update credential request for draft 13 - jwt_vc_json and ldp_vc #2796

* version update: 2.9.8+477

* Revert "version update: 2.9.8+477"

This reverts commit 6e8265c.

* Revert "version update: 2.9.8+477"

This reverts commit 6e8265c.

* refactor: Update jwt decode test

* refactor: Update oidc4vc test

* feat: Consider backgroun_image parameter in display external issuer #2800

* refactor: Update logic based on limi_disclosure #2801

* version update: 2.9.9+478

* refactor: Update logic based on limi_disclosure #2801

* version update: 2.9.10+479

* refactor: Try to display image #2771

* fix: Fix image and add photo viewer #2771

* refactor: Optimise code to load image smoothly side by side #2771

* feat: Display advanced security option in enterprise #2584

* refactor: Add specific error message when required address is not present in account list #2659

* feat: Remove crypto account #2065

* feat: Update error responses #2573

* feat: Update UI for remove account and bug fix #2065

* feat: Fix EBSI issue - pathNested format provided #2805

* refactor: Remove long error message for now #2573

* version update: 2.9.11+480

* refactor: Remove long error message for now #2573

* refactor: Display advanced security options #2584

* refactor: Bug fix and optimise code

* refactor: Update tezart package #2804

* some update and package update

* version update to 2.9.12+481

* feat: Update walletconnect #2806

* feat: Remove trust framework #2817

* feat: Improve design #2816

* fix: Show wallet attestation card #2810

* version update: 2.10.0+482

* feat: Add app name in the wallet attestation request #2808

* refactor: Bug fix - show dialog

* feat: Update developer data for OIDC4VCI #2811

* feat: Can add only one line in button

* version update to 2.10.1+483

---------

Co-authored-by: hawkbee1 <[email protected]>
  • Loading branch information
bibash28 and hawkbee1 authored Jul 30, 2024
1 parent ccc1752 commit 1087304
Show file tree
Hide file tree
Showing 147 changed files with 2,052 additions and 2,405 deletions.
Binary file added assets/image/diipLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/image/dummy_linkedin_card.png
Binary file not shown.
Binary file modified assets/image/ebsi_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/image/linkedin_banner.png
Binary file not shown.
Binary file removed assets/image/linkedin_card.png
Binary file not shown.
Binary file removed assets/image/owfBaselineProfileLogo.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/app/shared/constants/altme_strings.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class AltMeStrings {
static const String defaultDIDMethod = 'key';
static const String cryptoTezosDIDMethod = 'pkh:tz';
static const String cryptoEVMDIDMethod = 'pkh:eth';
static const String cryptoEVMDIDMethod = 'key';
static const String defaultDIDMethodName = 'Tezos';
static const String databaseFilename = 'wallet.db';
static const String appContactWebsiteName = 'www.altme.io';
Expand Down
7 changes: 1 addition & 6 deletions lib/app/shared/constants/image_strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class ImageStrings {

static const String imagePath = 'assets/image';
static const String ebsiLogo = '$imagePath/ebsi_logo.png';
static const String owfBaselineProfileLogo =
'$imagePath/owfBaselineProfileLogo.jpg';
static const String diipLogo = '$imagePath/diipLogo.png';

static const String cardMissing = '$imagePath/card_missing.png';
static const String employmentCertificateFront =
Expand Down Expand Up @@ -56,7 +55,6 @@ class ImageStrings {
'$imagePath/talao_community_card.png';
static const String verifiableIdCard = '$imagePath/verifiable_id_card.png';

static const String linkedInCard = '$imagePath/linkedin_card.png';
static const String kycAgeCredentialCard =
'$imagePath/kyc_age_credential_card.png';
static const String kycCountryOfResidenceCard =
Expand Down Expand Up @@ -124,7 +122,6 @@ class ImageStrings {

static const String dummyVerifiableIdCard =
'$imagePath/dummy_verifiable_id_card.png';
static const String dummyLinkedinCard = '$imagePath/dummy_linkedin_card.png';

static const String dummyPhonePassCard =
'$imagePath/dummy_phone_pass_card.png';
Expand Down Expand Up @@ -156,8 +153,6 @@ class ImageStrings {

static const String receiveSqure = '$imagePath/receive-square.png';

static const String linkedInBanner = '$imagePath/linkedin_banner.png';

static const String blankGetCard =
'$imagePath/blank_transparent_get_card.png';
}
11 changes: 10 additions & 1 deletion lib/app/shared/constants/parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ class Parameters {
ETH_SIGN_TYPE_DATA_V4,
];

static const walletConnectEvents = ['chainChanged', 'accountsChanged'];
static const chainChanged = 'chainChanged';
static const accountsChanged = 'accountsChanged';

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

static const allEvents = [...requiredEvents, ...optionalEvents];

static const String clientId = 'urn:altme:0001';
static const int maxEntries = 3;
Expand Down
2 changes: 0 additions & 2 deletions lib/app/shared/constants/secure_storage_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ class SecureStorageKeys {
static const String isFirstSelectedTokenContracts =
'isFirstSelectedTokenContracts';
static const String selectedContracts = 'selectedContracts';
static const String lastNotifiedUNORewardId = 'lastNotifiedUNORewardId';
static const String lastNotifiedXTZRewardId = 'lastNotifiedXTZRewardId';
static const String isIdentityEnabled = 'isIdentityEnabled';
static const String isProfessionalEnabled = 'isProfessionalEnabled';
static const String isCommunityEnabled = 'isCommunityEnabled';
Expand Down
1 change: 0 additions & 1 deletion lib/app/shared/constants/sizes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ abstract class Sizes {
static const double largeRadius = 18;

static const double credentialAspectRatio = 500 / 300;
static const double linkedinBannerAspectRatio = 1584 / 396;

//Icon
static const double iconXSmall = 12;
Expand Down
3 changes: 0 additions & 3 deletions lib/app/shared/constants/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ class Urls {
/// twitter card
static const String twitterCardUrl = 'https://issuer.talao.co/twitter/';

/// linkedin card
static const String linkedinCardUrl =
'https://issuer.talao.co/passbase/endpoint/linkedincard/';
// static const String talaoIpfsGafteway = 'https://talao.mypinata.cloud/ipfs/';
static const String ipfsGateway = 'https://ipfs.io/ipfs/';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ enum ResponseString {
RESPONSE_STRING_verifiableIdCardExpirationDate,
RESPONSE_STRING_verifiableIdCardHowToGetIt,
RESPONSE_STRING_verifiableIdCardDummyDesc,
RESPONSE_STRING_linkedinCardWhyGetThisCard,
RESPONSE_STRING_linkedinCardExpirationDate,
RESPONSE_STRING_linkedinCardHowToGetIt,
RESPONSE_STRING_phoneProofWhyGetThisCard,
RESPONSE_STRING_phoneProofExpirationDate,
RESPONSE_STRING_phoneProofHowToGetIt,
Expand All @@ -116,7 +113,6 @@ enum ResponseString {
RESPONSE_STRING_thisFeatureIsNotSupportedMessage,
RESPONSE_STRING_userNotFitErrorMessage,
RESPONSE_STRING_transactionIsLikelyToFail,
RESPONSE_STRING_linkedInBannerSuccessfullyExported,
RESPONSE_STRING_credentialSuccessfullyExported,
RESPONSE_STRING_livenessCardExpirationDate,
RESPONSE_STRING_livenessCardWhyGetThisCard,
Expand Down Expand Up @@ -161,4 +157,8 @@ enum ResponseString {
RESPONSE_STRING_invalidStatus,
RESPONSE_STRING_statusListInvalidSignature,
RESPONSE_STRING_theWalletIsSuspended,
RESPONSE_STRING_couldNotFindTheAccountWithThisAddress,
RESPONSE_STRING_invalidClientErrorDescription,
RESPONSE_STRING_vpFormatsNotSupportedErrorDescription,
RESPONSE_STRING_invalidPresentationDefinitionUriErrorDescription,
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ extension ResponseStringX on ResponseString {
case ResponseString.RESPONSE_STRING_BACKUP_CREDENTIAL_SUCCESS_MESSAGE:
return globalMessage.RESPONSE_STRING_BACKUP_CREDENTIAL_SUCCESS_MESSAGE;

case ResponseString.RESPONSE_STRING_linkedInBannerSuccessfullyExported:
return globalMessage.RESPONSE_STRING_linkedInBannerSuccessfullyExported;

case ResponseString.RESPONSE_STRING_credentialSuccessfullyExported:
return globalMessage.RESPONSE_STRING_credentialSuccessfullyExported;

Expand Down Expand Up @@ -299,15 +296,6 @@ extension ResponseStringX on ResponseString {
case ResponseString.RESPONSE_STRING_verifiableIdCardHowToGetIt:
return globalMessage.RESPONSE_STRING_verifiableIdCardHowToGetIt;

case ResponseString.RESPONSE_STRING_linkedinCardWhyGetThisCard:
return globalMessage.RESPONSE_STRING_linkedinCardWhyGetThisCard;

case ResponseString.RESPONSE_STRING_linkedinCardExpirationDate:
return globalMessage.RESPONSE_STRING_linkedinCardExpirationDate;

case ResponseString.RESPONSE_STRING_linkedinCardHowToGetIt:
return globalMessage.RESPONSE_STRING_linkedinCardHowToGetIt;

case ResponseString.RESPONSE_STRING_phoneProofWhyGetThisCard:
return globalMessage.RESPONSE_STRING_phoneProofWhyGetThisCard;

Expand Down Expand Up @@ -509,6 +497,24 @@ extension ResponseStringX on ResponseString {

case ResponseString.RESPONSE_STRING_theWalletIsSuspended:
return globalMessage.RESPONSE_STRING_theWalletIsSuspended;

case ResponseString.RESPONSE_STRING_couldNotFindTheAccountWithThisAddress:
return globalMessage
.RESPONSE_STRING_couldNotFindTheAccountWithThisAddress(
injectedMessage ?? '',
);

case ResponseString.RESPONSE_STRING_invalidClientErrorDescription:
return globalMessage.RESPONSE_STRING_invalidClientErrorDescription;

case ResponseString.RESPONSE_STRING_vpFormatsNotSupportedErrorDescription:
return globalMessage
.RESPONSE_STRING_vpFormatsNotSupportedErrorDescription;

case ResponseString
.RESPONSE_STRING_invalidPresentationDefinitionUriErrorDescription:
return globalMessage
.RESPONSE_STRING_invalidPresentationDefinitionUriErrorDescription;
}
}
}
25 changes: 25 additions & 0 deletions lib/app/shared/enum/type/blockchain_type.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:credential_manifest/credential_manifest.dart';
import 'package:key_generator/key_generator.dart';

Expand Down Expand Up @@ -234,4 +235,28 @@ extension BlockchainTypeX on BlockchainType {
return false;
}
}

bool isSupported(ProfileSetting profileSetting) {
if (profileSetting.generalOptions.walletType != WalletAppType.altme) {
/// Only applies to altme
return true;
}

final blockchainOptions = profileSetting.blockchainOptions;

switch (this) {
case BlockchainType.tezos:
if (blockchainOptions?.tezosSupport ?? false) return true;
case BlockchainType.ethereum:
if (blockchainOptions?.ethereumSupport ?? false) return true;
case BlockchainType.fantom:
if (blockchainOptions?.fantomSupport ?? false) return true;
case BlockchainType.polygon:
if (blockchainOptions?.polygonSupport ?? false) return true;
case BlockchainType.binance:
if (blockchainOptions?.bnbSupport ?? false) return true;
}

return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ enum CredentialSubjectType {
kycAgeCredential,
kycCountryOfResidence,
learningAchievement,
linkedInCard,
nationality,
over13,
over15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
case CredentialSubjectType.gender:
case CredentialSubjectType.tezosAssociatedWallet:
case CredentialSubjectType.verifiableIdCard:
case CredentialSubjectType.linkedInCard:
case CredentialSubjectType.over13:
case CredentialSubjectType.over15:
case CredentialSubjectType.over18:
Expand Down Expand Up @@ -140,8 +139,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
return 'IdentityPass';
case CredentialSubjectType.verifiableIdCard:
return 'VerifiableId';
case CredentialSubjectType.linkedInCard:
return 'LinkedinCard';
case CredentialSubjectType.learningAchievement:
return 'LearningAchievement';
case CredentialSubjectType.over13:
Expand Down Expand Up @@ -303,8 +300,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
return AragoOver18Model.fromJson(json);
case CredentialSubjectType.pcdsAgentCertificate:
return PcdsAgentCertificateModel.fromJson(json);
case CredentialSubjectType.linkedInCard:
return LinkedinCardModel.fromJson(json);
case CredentialSubjectType.ethereumPooAddress:
return EthereumPooAddressModel.fromJson(json);
case CredentialSubjectType.fantomPooAddress:
Expand Down Expand Up @@ -418,8 +413,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
this == CredentialSubjectType.ageRange ||
this == CredentialSubjectType.nationality ||
this == CredentialSubjectType.gender ||
this == CredentialSubjectType.passportFootprint ||
this == CredentialSubjectType.linkedInCard) {
this == CredentialSubjectType.passportFootprint) {
return true;
}
return false;
Expand Down Expand Up @@ -507,8 +501,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
return 'Identity Pass';
case CredentialSubjectType.verifiableIdCard:
return 'VerifiableId';
case CredentialSubjectType.linkedInCard:
return 'Linkedin Card';
case CredentialSubjectType.learningAchievement:
return 'Learning Achievement';
case CredentialSubjectType.over13:
Expand Down Expand Up @@ -622,7 +614,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
case CredentialSubjectType.certificateOfEmployment:
case CredentialSubjectType.defaultCredential:
case CredentialSubjectType.emailPass:
case CredentialSubjectType.linkedInCard:
case CredentialSubjectType.learningAchievement:
case CredentialSubjectType.phonePass:
case CredentialSubjectType.professionalExperienceAssessment:
Expand Down Expand Up @@ -670,20 +661,21 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
case CredentialSubjectType.defiCompliance:
case CredentialSubjectType.tezotopiaMembership:
case CredentialSubjectType.chainbornMembership:
return [VCFormatType.ldpVc];
return [VCFormatType.ldpVc, VCFormatType.auto];

case CredentialSubjectType.verifiableIdCard:
return [
VCFormatType.ldpVc,
VCFormatType.jwtVcJson,
VCFormatType.vcSdJWT,
VCFormatType.jwtVc,
VCFormatType.auto,
];

case CredentialSubjectType.identityCredential:
case CredentialSubjectType.eudiPid:
case CredentialSubjectType.pid:
return [VCFormatType.vcSdJWT];
return [VCFormatType.vcSdJWT, VCFormatType.auto];

case CredentialSubjectType.over18:
case CredentialSubjectType.phonePass:
Expand All @@ -692,6 +684,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
return [
VCFormatType.ldpVc,
VCFormatType.jwtVcJson,
VCFormatType.auto,
];

case CredentialSubjectType.nationality:
Expand All @@ -710,7 +703,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
case CredentialSubjectType.binancePooAddress:
case CredentialSubjectType.certificateOfEmployment:
case CredentialSubjectType.defaultCredential:
case CredentialSubjectType.linkedInCard:
case CredentialSubjectType.learningAchievement:
case CredentialSubjectType.professionalExperienceAssessment:
case CredentialSubjectType.professionalSkillAssessment:
Expand All @@ -731,7 +723,7 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
case CredentialSubjectType.civicPassCredential:
case CredentialSubjectType.employeeCredential:
case CredentialSubjectType.legalPersonalCredential:
return [VCFormatType.jwtVc];
return [VCFormatType.jwtVc, VCFormatType.auto];
}
}

Expand Down Expand Up @@ -915,15 +907,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
ResponseString.RESPONSE_STRING_verifiableIdCardExpirationDate;
howToGetIt = ResponseString.RESPONSE_STRING_verifiableIdCardHowToGetIt;

case CredentialSubjectType.linkedInCard:
image = ImageStrings.dummyLinkedinCard;
link = Urls.linkedinCardUrl;
whyGetThisCard =
ResponseString.RESPONSE_STRING_linkedinCardWhyGetThisCard;
expirationDateDetails =
ResponseString.RESPONSE_STRING_linkedinCardExpirationDate;
howToGetIt = ResponseString.RESPONSE_STRING_linkedinCardHowToGetIt;

case CredentialSubjectType.tezotopiaMembership:
image = ImageStrings.tezotopiaMemberShipDummy;
link = Urls.tezotopiaMembershipCardUrl;
Expand Down Expand Up @@ -1105,8 +1088,6 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
return 90;
case CredentialSubjectType.verifiableIdCard:
return 97.5;
case CredentialSubjectType.linkedInCard:
return 86;
case CredentialSubjectType.learningAchievement:
return 0;
case CredentialSubjectType.over13:
Expand Down
31 changes: 13 additions & 18 deletions lib/app/shared/enum/type/profile/profile_type.dart
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
import 'package:altme/l10n/l10n.dart';

enum ProfileType {
defaultOne,
ebsiV3,
dutch,
owfBaselineProfile,
diipv2point1,
diipv3,
custom,
enterprise,
}

extension ProfileTypeX on ProfileType {
String getTitle({
required AppLocalizations l10n,
required String name,
}) {
String getTitle({required String name}) {
switch (this) {
case ProfileType.custom:
return l10n.profileCustom;
return 'Custom';
case ProfileType.ebsiV3:
return l10n.profileEbsiV3;
case ProfileType.dutch:
return l10n.decentralizedIdentityInteropProfile;
return 'European Blockchain Services Infrastructure';
case ProfileType.diipv2point1:
return 'Decentralized Identity Interop Profile (DIIP v2.1)';
case ProfileType.enterprise:
return name.isEmpty ? l10n.enterprise : name;
case ProfileType.owfBaselineProfile:
return l10n.oWFBaselineProfile;
return name.isEmpty ? 'Enterprise' : name;
case ProfileType.diipv3:
return 'Decentralized Identity Interop Profile (DIIP v3.0)';
case ProfileType.defaultOne:
return l10n.defaultProfile;
return 'Default';
}
}

bool get showSponseredBy {
switch (this) {
case ProfileType.custom:
case ProfileType.defaultOne:
case ProfileType.dutch:
case ProfileType.diipv2point1:
return false;
case ProfileType.ebsiV3:
case ProfileType.enterprise:
case ProfileType.owfBaselineProfile:
case ProfileType.diipv3:
return true;
}
}
Expand Down
Loading

0 comments on commit 1087304

Please sign in to comment.