Skip to content

Commit

Permalink
fix: cast indyproof to correct representation
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Auer <[email protected]>
  • Loading branch information
auer-martin committed Jul 26, 2023
1 parent 4807343 commit 71c430b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ export class IndySdkHolderService implements AnonCredsHolderService {
indyProof,
})

return indyProof
// FIXME IndyProof if badly typed in indy-sdk. It contains a `requested_predicates` property, which should be `predicates`.
return indyProof as unknown as AnonCredsProof
} catch (error) {
agentContext.config.logger.error(`Error creating Indy Proof`, {
error,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AnonCredsVerifierService, VerifyProofOptions } from '@aries-framework/anoncreds'
import type { AnonCredsProof, AnonCredsVerifierService, VerifyProofOptions } from '@aries-framework/anoncreds'
import type { AgentContext } from '@aries-framework/core'
import type { CredentialDefs, Schemas, RevocRegDefs, RevRegs, IndyProofRequest, IndyProof } from 'indy-sdk'

Expand Down Expand Up @@ -82,7 +82,8 @@ export class IndySdkVerifierService implements AnonCredsVerifierService {

return await this.indySdk.verifierVerifyProof(
options.proofRequest as IndyProofRequest,
options.proof as IndyProof,
// FIXME IndyProof if badly typed in indy-sdk. It contains a `requested_predicates` property, which should be `predicates`.
options.proof as unknown as IndyProof,
indySchemas,
indyCredentialDefinitions,
indyRevocationDefinitions,
Expand Down

0 comments on commit 71c430b

Please sign in to comment.