Skip to content

Commit

Permalink
Fix dg1Commitment index
Browse files Browse the repository at this point in the history
  • Loading branch information
J3imip committed Dec 18, 2024
1 parent 4ac8dbc commit c93565c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ verifier:
disableNameChecks: false

addresses:
registration_contract: 8B8b14B6bD955eCc96bee1D83a3Eba21B80A0E91
registration_contract: a2e2Cbbd0BAa74FE1bb4b61B12D420072806FFe0
verifiers:
sha1: 50f07F4E66Cc7A09186120B6e0152602768923ac
sha224: b83D5fd8A498482b123EE1837B86B82CCd33240D
Expand Down
2 changes: 1 addition & 1 deletion internal/service/api/handlers/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func Register(w http.ResponseWriter, r *http.Request) {
return
}

proofDg1Commitment, ok := big.NewInt(0).SetString(req.Data.Attributes.ZkProof.PubSignals[0], 10)
proofDg1Commitment, ok := big.NewInt(0).SetString(req.Data.Attributes.ZkProof.PubSignals[1], 10)
if !ok {
log.Error("failed to convert proofDg1Commitment to big.Int")
jsonError = append(jsonError, problems.InternalError())
Expand Down
6 changes: 3 additions & 3 deletions internal/utils/asn1_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func TruncateHexPrefix(hexString string) string {
}

func BuildSignedData(
contract, verifier *common.Address,
passportHash, dg1Hash, publicKey [32]byte,
contract, verifier *common.Address,
passportHash, dg1Commitment, publicKey [32]byte,
) ([]byte, error) {
return abiEncodePacked(types.RegistrationSimplePrefix, contract, passportHash[:], dg1Hash[:], publicKey[:], verifier)
return abiEncodePacked(types.RegistrationSimplePrefix, contract, passportHash[:], dg1Commitment[:], publicKey[:], verifier)
}

func ExtractPublicKey(dg15 []byte) (interface{}, [32]byte, error) {
Expand Down

0 comments on commit c93565c

Please sign in to comment.