diff --git a/x/crosschain/keeper/grpc_query_cctx.go b/x/crosschain/keeper/grpc_query_cctx.go index a157a95433..fed1d3323d 100644 --- a/x/crosschain/keeper/grpc_query_cctx.go +++ b/x/crosschain/keeper/grpc_query_cctx.go @@ -20,6 +20,8 @@ const ( // MaxLookbackNonce is the maximum number of nonces to look back to find missed pending cctxs MaxLookbackNonce = 1000 + + defaultPageSize = 100 ) func (k Keeper) ZetaAccounting( @@ -46,6 +48,10 @@ func (k Keeper) CctxAll(c context.Context, req *types.QueryAllCctxRequest) (*typ store := ctx.KVStore(k.storeKey) sendStore := prefix.NewStore(store, types.KeyPrefix(types.CCTXKey)) + if req.Pagination.Limit == 0 { + req.Pagination.Limit = defaultPageSize + } + pageRes, err := query.Paginate(sendStore, req.Pagination, func(_ []byte, value []byte) error { var send types.CrossChainTx if err := k.cdc.Unmarshal(value, &send); err != nil {