Skip to content

Commit

Permalink
Merge pull request #133 from identity-com/features/ID-934TransientCre…
Browse files Browse the repository at this point in the history
…dentials

Features/id 934 transient credentials
  • Loading branch information
jpsantosbh authored Oct 23, 2019
2 parents 94b0733 + 5f15278 commit 275eab9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
{
"name": "@identity.com/credential-commons",
"version": "1.0.29",
"version": "1.0.30",
"author": "Identity.com Community",
"license": "MIT",
"description": "Verifiable Credential and Attestation Library",
Expand Down
4 changes: 2 additions & 2 deletions src/creds/VerifiableCredential.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function VerifiableCredentialBaseConstructor(identifier, issuer, expiryIn, ucas,
* This method checks if the signature matches for the root of the Merkle Tree
* @return true or false for the validation
*/
this.verifySignature = async () => {
this.verifySignature = () => {
if (this.proof.type === 'transient') {
return true;
}
Expand Down Expand Up @@ -707,7 +707,7 @@ function VerifiableCredentialBaseConstructor(identifier, issuer, expiryIn, ucas,
* @param {string} option.pvtKey - A pvtKey in base58 format (default impl).
*/
this.grantUsageFor = (requestorId, requestId, { keyName, pvtKey }) => {
if (_.isEmpty(_.get(this.proof, 'anchor.subject.label')) || _.isEmpty(_.get(this.proof, 'anchor.subject.pub'))) {
if (_.isEmpty(_.get(this.proof, 'anchor.subject.label')) || _.isEmpty(_.get(this.proof, 'anchor.subject.data'))) {
throw new Error('Invalid credential attestation/anchor');
}
if (!this.verifySignature()) {
Expand Down

0 comments on commit 275eab9

Please sign in to comment.