Skip to content

Commit

Permalink
add orderBy parameter to TxsByEvents (#8815)
Browse files Browse the repository at this point in the history
* 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 <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
(cherry picked from commit 553aac5)

# Conflicts:
#	x/auth/tx/service.go
  • Loading branch information
aleem1314 authored and mergify-bot committed Mar 15, 2021
1 parent 1e17860 commit 8857b99
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions x/auth/tx/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8857b99

Please sign in to comment.