From 8857b99823b883c483143ecc450f18e40121c921 Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Mon, 15 Mar 2021 23:26:33 +0530 Subject: [PATCH] add orderBy parameter to TxsByEvents (#8815) * add orderBy parameter to grpc query * add orderby parameter * change orderBy param to enum * lint * proto lint * add changelog * Update x/auth/tx/service.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Alessio Treglia Co-authored-by: Jonathan Gimeno Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> (cherry picked from commit 553aac50305b02e406cd51479b48a99ca34b4a4e) # Conflicts: # x/auth/tx/service.go --- x/auth/tx/service.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index a80fb3e0040d..0a6930dad207 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -161,3 +161,17 @@ func RegisterTxService( func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { txtypes.RegisterServiceHandlerClient(context.Background(), mux, txtypes.NewServiceClient(clientConn)) } +<<<<<<< HEAD +======= + +func parseOrderBy(orderBy txtypes.OrderBy) string { + switch orderBy { + case txtypes.OrderBy_ORDER_BY_ASC: + return "asc" + case txtypes.OrderBy_ORDER_BY_DESC: + return "desc" + default: + return "" // Defaults to Tendermint's default, which is `asc` now. + } +} +>>>>>>> 553aac503... add orderBy parameter to TxsByEvents (#8815)