Skip to content

Commit

Permalink
fix: excluding empty graffiti
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami committed Jan 9, 2025
1 parent d0a4e7a commit eb2e0c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/pkg/api/handlers/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ func (h *HandlerService) handleSearchValidatorsByGraffitiHex(ctx context.Context
if err != nil {
return nil, err
}
// exclude the empty hex graffiti
var graffitiArray [32]byte
copy(graffitiArray[:], graffitiHex)
if graffitiArray == [32]byte{} {
return nil, nil // return no error as to not disturb the other search types
}
result, err := h.daService.GetSearchValidatorsByGraffitiHex(ctx, chainId, graffitiHex)
return asSearchResult(validatorsByGraffitiHex, chainId, result, err)
}
Expand Down

0 comments on commit eb2e0c4

Please sign in to comment.