Skip to content

Commit

Permalink
fix getEventFacotry test
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Jul 8, 2024
1 parent 92f0142 commit 6449f46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.env
.envrc
/sink-data
.idea
Empty file.
4 changes: 4 additions & 0 deletions injective-events/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package injective_events

import (
"fmt"
"sort"
"strings"
"time"
)
Expand Down Expand Up @@ -59,6 +60,9 @@ func (e eventDesc) GetEventQuery() string {
if len(attributes) == 0 {
return fmt.Sprintf("type:%s", e.EventType)
}

sort.Strings(attributes)

return fmt.Sprintf("(type:%s && (%s))", e.EventType, strings.Join(attributes, " && "))
}
func (e eventDesc) GetEventIndexQuery() string {
Expand Down

0 comments on commit 6449f46

Please sign in to comment.