From 3d15ada5a3709816127f59fc44fe95d59024e34a Mon Sep 17 00:00:00 2001 From: Zaptoss Date: Wed, 10 Jul 2024 12:07:27 +0300 Subject: [PATCH] Fix proof: pub signal validation and selector --- internal/config/verifier.go | 2 +- internal/service/requests/verify_passport.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/verifier.go b/internal/config/verifier.go index 2325d93..8390a3c 100644 --- a/internal/config/verifier.go +++ b/internal/config/verifier.go @@ -10,7 +10,7 @@ import ( const ( proofEventIDValue = "111186066134341633902189494613533900917417361106374681011849132651019822199" - proofSelectorValue = "219681" + proofSelectorValue = "236065" maxIdentityCount = 1 documentTypeID = "ID" ) diff --git a/internal/service/requests/verify_passport.go b/internal/service/requests/verify_passport.go index b45f3ed..eee15c9 100644 --- a/internal/service/requests/verify_passport.go +++ b/internal/service/requests/verify_passport.go @@ -48,6 +48,6 @@ func NewVerifyPassport(r *http.Request) (req resources.VerifyPassportRequest, er val.When(verifyPassportPathRegexp.MatchString(r.URL.Path), val.Required), val.When(joinProgramPathRegexp.MatchString(r.URL.Path), val.Nil)), "data/attributes/proof/proof": val.Validate(proof.Proof, val.When(attr.Proof != nil, val.Required)), - "data/attributes/proof/pub_signals": val.Validate(proof.PubSignals, val.When(attr.Proof != nil, val.Required, val.Length(22, 22))), + "data/attributes/proof/pub_signals": val.Validate(proof.PubSignals, val.When(attr.Proof != nil, val.Required, val.Length(24, 24))), }.Filter() }