2024-07-04 05:23:26 +00:00
|
|
|
package keeper
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
|
|
|
|
onboardingtypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ onboardingtypes.QueryServer = queryServer{}
|
|
|
|
|
|
|
|
type queryServer struct {
|
|
|
|
k *Keeper
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQueryServerImpl returns an implementation of the module QueryServer.
|
|
|
|
func NewQueryServerImpl(k *Keeper) onboardingtypes.QueryServer {
|
|
|
|
return queryServer{k}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Participants implements Participants.QueryServer.
|
2024-07-11 05:16:31 +00:00
|
|
|
func (qs queryServer) Participants(
|
|
|
|
c context.Context,
|
|
|
|
_ *onboardingtypes.QueryParticipantsRequest,
|
|
|
|
) (*onboardingtypes.QueryParticipantsResponse, error) {
|
2024-07-04 05:23:26 +00:00
|
|
|
ctx := sdk.UnwrapSDKContext(c)
|
|
|
|
|
|
|
|
resp, err := qs.k.ListParticipants(ctx)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
|
|
|
|
}
|