Skip to content

Commit

Permalink
address the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 committed Dec 12, 2023
1 parent 3b95b3c commit 7eb137e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 0 additions & 4 deletions x/oracle/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,6 @@ func (q querier) ExgRatesWithTimestamp(
// MissCounters implements types.QueryServer.
func (q querier) MissCounters(goCtx context.Context, req *types.QueryMissCounters) (*types.QueryMissCountersResponse,
error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}

ctx := sdk.UnwrapSDKContext(goCtx)

var pfMissCounts []types.PriceMissCounter
Expand Down
10 changes: 5 additions & 5 deletions x/uibc/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ func GetQueryCmd() *cobra.Command {
QueryParams(),
GetOutflows(),
GetInflows(),
GetQuotaEndTime(),
GetQuotaExpireTime(),
)

return cmd
}

// GetQuotaEndTime returns end time for the current quota period.
func GetQuotaEndTime() *cobra.Command {
// GetQuotaExpireTime returns end time for the current quota period.
func GetQuotaExpireTime() *cobra.Command {
cmd := &cobra.Command{
Use: "quota-end-time",
Use: "quota-expire-time",
Args: cobra.NoArgs,
Short: "Get the current ibc quota end time.",
Short: "Get the current ibc quota expire time.",
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions x/uibc/quota/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ func (q Querier) Inflows(goCtx context.Context, req *uibc.QueryInflows) (*uibc.Q
return &uibc.QueryInflowsResponse{Sum: q.Keeper(&ctx).GetInflowSum(), Inflows: inflows}, nil
}

// QuotaExpires returns the current ibc quota end time.
func (q Querier) QuotaExpires(goCtx context.Context, _ *uibc.QueryQuotaExpires) (*uibc.QueryQuotaExpiresResponse, error) {
// QuotaExpires returns the current ibc quota expire time.
func (q Querier) QuotaExpires(goCtx context.Context, _ *uibc.QueryQuotaExpires) (*uibc.QueryQuotaExpiresResponse,
error) {
ctx := sdk.UnwrapSDKContext(goCtx)

quotaExpireTime, err := q.Keeper(&ctx).GetExpire()
Expand Down

0 comments on commit 7eb137e

Please sign in to comment.