Skip to content

Commit

Permalink
fix: Incorrect verification method id returned when signing credentia…
Browse files Browse the repository at this point in the history
…ls in some cases
  • Loading branch information
nklomp committed Jan 13, 2023
1 parent c508507 commit bdbf4ef
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export class CredentialHandlerLDLocal implements IAgentPlugin {
return await this.ldCredentialModule.issueLDVerifiableCredential(
credential,
identifier.did,
managedKey || signingKey,
managedKey ? (verificationMethod as string) : verificationMethodId,
managedKey || signingKey, // todo: signingKey does not have the private key, so would never work
verificationMethodId ? verificationMethodId : (verificationMethod as string),
args.purpose,
context
)
Expand Down Expand Up @@ -184,7 +184,7 @@ export class CredentialHandlerLDLocal implements IAgentPlugin {
return await this.ldCredentialModule.signLDVerifiablePresentation(
presentation,
identifier.did,
signingKey || managedKey,
managedKey || signingKey, // todo: signingKey does not have the private key, so would never work
verificationMethodId ? verificationMethodId : (verificationMethod as string),
args.challenge,
args.domain,
Expand Down

0 comments on commit bdbf4ef

Please sign in to comment.