From 960f795a833b31cd283a6a57f32cbe394097b479 Mon Sep 17 00:00:00 2001 From: jilio Date: Fri, 4 Oct 2024 14:04:54 +1000 Subject: [PATCH] fix: add delay for merkle proof service --- internal/zkcert/generator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/zkcert/generator.go b/internal/zkcert/generator.go index c2f1bc7..350cf36 100644 --- a/internal/zkcert/generator.go +++ b/internal/zkcert/generator.go @@ -103,6 +103,9 @@ func (s *Service) AddZKCertToQueue( ) { s.taskQueue.Add(tq.NewTask( func() (zkcertificate.IssuedCertificate[zkcertificate.KYCContent], error) { + // This is to give the merkle proof service time to "see" the latest merkle proof root + time.Sleep(3 * time.Second) + _, issuedCert, err := cmd.IssueZKCert(ctx, certificate, s.EthClient, s.merkleProofClient, s.registryAddress, s.providerKey) if err != nil { log.WithError(err).Error("issue zk certificate")