Skip to content

Commit

Permalink
Merge pull request #1631 from blockchain-certificates/feat/vc-v2-name…
Browse files Browse the repository at this point in the history
…-description

Feat/vc v2 name description
  • Loading branch information
lemoustachiste authored Nov 5, 2024
2 parents 8c967b7 + 29e7804 commit ae5ebce
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 47 deletions.
79 changes: 40 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@blockcerts/cert-verifier-js": "^6.17.1",
"@blockcerts/cert-verifier-js": "^6.19.0",
"@blockcerts/cert-verifier-js-v1-legacy": "^4.0.1",
"@polymer/lit-element": "0.5.1",
"@polymer/polymer": "3.5.1",
Expand Down
10 changes: 3 additions & 7 deletions src/selectors/certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { isValidUrl } from '../helpers/validations';
import { VERIFICATION_STATUSES } from '../constants/verificationStatuses';
import { CONTENT_TYPES } from '../constants/contentTypes';
import getText from '../i18n/getText';
import type { IVerificationMapItem, Signers, Certificate, BlockcertsV3 } from '@blockcerts/cert-verifier-js';
import type { IVerificationMapItem, Signers, Certificate } from '@blockcerts/cert-verifier-js';
import type { BlockcertsVerifierState, IFinalStep } from '../store/getInitialState';
import type { V1Signature } from '../models/V1Signature';

Expand Down Expand Up @@ -57,9 +57,7 @@ export function getCertificateTitle (state: BlockcertsVerifierState): string {
const certificateDefinition = getCertificateDefinition(state);

if (certificateDefinition) {
return certificateDefinition.name ??
(certificateDefinition.certificateJson as BlockcertsV3)?.name ??
'';
return certificateDefinition.name ?? '';
}

return '';
Expand Down Expand Up @@ -372,9 +370,7 @@ export function getCertificateDescription (state: BlockcertsVerifierState): stri
const certificateDefinition = getCertificateDefinition(state);

if (certificateDefinition) {
return certificateDefinition.description ??
(certificateDefinition.certificateJson as BlockcertsV3)?.description ??
'';
return certificateDefinition.description ?? '';
}

return '';
Expand Down

0 comments on commit ae5ebce

Please sign in to comment.