Fixed match.events order in light client rpc

This commit is contained in:
Jasmina Malicevic
2022-12-14 13:35:15 +01:00
parent 6fe2b13283
commit b9f5a5b2d9

View File

@@ -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)
}