diff --git a/light/proxy/routes.go b/light/proxy/routes.go index 9e0d590bd..69aaa712e 100644 --- a/light/proxy/routes.go +++ b/light/proxy/routes.go @@ -177,7 +177,7 @@ func makeTxSearchFuncMatchEvents(c *lrpc.Client) rpcTxSearchFuncMatchEvents { matchEvents bool, ) (*ctypes.ResultTxSearch, error) { if matchEvents { - query = query + " AND match.events = 1" + query = "match.events = 1 AND " + query } return c.TxSearch(ctx.Context(), query, prove, page, perPage, orderBy) } @@ -202,7 +202,7 @@ func makeBlockSearchFuncMatchEvents(c *lrpc.Client) rpcBlockSearchFuncMatchEvent matchEvents bool, ) (*ctypes.ResultBlockSearch, error) { if matchEvents { - query = query + " AND match.events = 1" + query = "match.events = 1 AND " + query } return c.BlockSearch(ctx.Context(), query, page, perPage, orderBy) }