Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Feb 2, 2024
1 parent 894ef55 commit c3c8022
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions verifiable/credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ func verifyIden3SparseMerkleTreeProof(ctx context.Context,
if err != nil {
return err
}
issuerShateHash, err := merkletree.NewHashFromHex(*proof.IssuerData.State.ClaimsTreeRoot)
issuerClaimsTreeRoot, err := merkletree.NewHashFromHex(*proof.IssuerData.State.ClaimsTreeRoot)
if err != nil {
return fmt.Errorf("invalid state formant: %v", err)
}

if rootFromProof.BigInt().Cmp(issuerShateHash.BigInt()) != 0 {
if rootFromProof.BigInt().Cmp(issuerClaimsTreeRoot.BigInt()) != 0 {
return errors.New("verifyIden3SparseMerkleTreeProof: root from proof not equal to issuer data claims tree root")
}

Expand All @@ -292,6 +292,7 @@ func getIden3StateInfo2023FromDIDDocument(document DIDDocument) (*CommonVerifica
if a.Type == "Iden3StateInfo2023" {
a2 := a
iden3StateInfo2023 = &a2
break
}
}
if iden3StateInfo2023 == nil {
Expand Down

0 comments on commit c3c8022

Please sign in to comment.