Skip to content

Commit

Permalink
fix filteredEvents in event.Run
Browse files Browse the repository at this point in the history
  • Loading branch information
kish1n committed Aug 8, 2024
1 parent 8ec7d94 commit e36204a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/service/event/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,19 @@ func Run(cfg config.Config, date int) error {
return nil
}

nullifiers := make([]string, 0)
nullifiers := make([]string, 0, len(balances))

for _, balance := range balances {
nullifiers = append(nullifiers, balance.Nullifier)
}

filteredEvents, err := eventsQ.
FilterByType(models.TypeEarlyTest).
FilterByStatus(data.EventFulfilled).
FilterByNullifier(nullifiers...).
Select()

if err != nil {
log.WithError(err).Error("failed to filter eventsQ")
log.WithError(err).Error("Failed to select %s events")
return err
}

Expand Down

0 comments on commit e36204a

Please sign in to comment.