We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49af443 commit c336856Copy full SHA for c336856
protocol/get_events.go
@@ -5,6 +5,7 @@ import (
5
"errors"
6
"fmt"
7
"strings"
8
+ "strings"
9
10
"github.com/stellar/go/strkey"
11
"github.com/stellar/go/xdr"
@@ -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