Skip to content

Commit

Permalink
fix: Pass authVerifDelay to Verify function
Browse files Browse the repository at this point in the history
  • Loading branch information
x1m3 committed Oct 21, 2024
1 parent d51f162 commit 6f0b289
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packers/zkp.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,15 @@ func (p *ZKPPacker) Unpack(envelope []byte, params ...iden3comm.PackerParams) (*
return nil, errors.New("message proof is invalid")
}

var authVerifDelay time.Duration
var verifyOpts []DefaultZKPUnpackerOption
if len(params) == 1 {
zkParams, ok := (params[0]).(ZKPPUnpackerParams)
if !ok {
return nil, errors.New("can't cast params to zkp unpacker params")
}
authVerifDelay = zkParams.authVerifyDelay
verifyOpts = append(verifyOpts, WithAuthVerifyDelay(zkParams.authVerifyDelay))
}
_ = authVerifDelay
err = verificationKey.VerificationFn.Verify(circuits.CircuitID(token.CircuitID), token.ZkProof.PubSignals) // TODO: Pass as a config func the value of authVerifDelay to Verify()
err = verificationKey.VerificationFn.Verify(circuits.CircuitID(token.CircuitID), token.ZkProof.PubSignals, verifyOpts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 6f0b289

Please sign in to comment.