We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49af443 commit b5a7d8bCopy full SHA for b5a7d8b
protocol/get_events.go
@@ -4,6 +4,7 @@ import (
4
"encoding/json"
5
"errors"
6
"fmt"
7
+ "slices"
8
"strings"
9
10
"github.com/stellar/go/strkey"
@@ -212,12 +213,7 @@ func (e *EventFilter) matchesContractIDs(event xdr.ContractEvent) bool {
212
213
return false
214
}
215
needle := strkey.MustEncode(strkey.VersionByteContract, (*event.ContractId)[:])
- for _, id := range e.ContractIDs {
216
- if id == needle {
217
- return true
218
- }
219
220
- return false
+ return slices.Contains(e.ContractIDs, needle)
221
222
223
func (e *EventFilter) matchesTopics(event xdr.ContractEvent) bool {
0 commit comments