Skip to content

Commit

Permalink
Added few code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrinivas8687 committed Aug 14, 2023
1 parent e45b878 commit 506b143
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x/plan/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func queryPlans() *cobra.Command {
flags.AddQueryFlagsToCmd(cmd)
flags.AddPaginationFlagsToCmd(cmd, "plans")
cmd.Flags().String(flagProvider, "", "filter the plans by provider address")
cmd.Flags().String(flagStatus, "", "filter the plans by by status (active|inactive)")
cmd.Flags().String(flagStatus, "", "filter the plans by status (active|inactive)")

return cmd
}
4 changes: 4 additions & 0 deletions x/session/keeper/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import (
)

func (k *Keeper) SubscriptionInactivePendingHook(ctx sdk.Context, id uint64) error {
// Get the status change delay from the store.
statusChangeDelay := k.StatusChangeDelay(ctx)

// Iterate through sessions associated with the subscription.
k.IterateSessionsForSubscription(ctx, id, func(_ int, item types.Session) (stop bool) {
// Skip non-active sessions.
if !item.Status.Equal(hubtypes.StatusActive) {
return false
}
Expand Down
4 changes: 2 additions & 2 deletions x/subscription/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func querySubscriptions() *cobra.Command {
func queryAllocation() *cobra.Command {
cmd := &cobra.Command{
Use: "allocation [subscription-id] [account-addr]",
Short: "Query a allocation of an address",
Short: "Query an allocation",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
ctx, err := client.GetClientQueryContext(cmd)
Expand Down Expand Up @@ -201,7 +201,7 @@ func queryAllocation() *cobra.Command {
func queryAllocations() *cobra.Command {
cmd := &cobra.Command{
Use: "allocations [subscription-id]",
Short: "Query allocations of a subscription",
Short: "Query allocations",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
ctx, err := client.GetClientQueryContext(cmd)
Expand Down

0 comments on commit 506b143

Please sign in to comment.