|
1 | 1 | package cli
|
2 | 2 |
|
3 | 3 | import (
|
4 |
| - "context" |
5 |
| - |
6 | 4 | "github.com/cosmos/cosmos-sdk/client"
|
7 | 5 | "github.com/cosmos/cosmos-sdk/client/flags"
|
8 | 6 | "github.com/spf13/cobra"
|
@@ -51,7 +49,7 @@ func GetQueryCmdKeys() *cobra.Command {
|
51 | 49 | return err
|
52 | 50 | }
|
53 | 51 |
|
54 |
| - res, err := queryClient.Keys(context.Background(), &types.QueryKeysRequest{Pagination: pageReq}) |
| 52 | + res, err := queryClient.Keys(cmd.Context(), &types.QueryKeysRequest{Pagination: pageReq}) |
55 | 53 | if err != nil {
|
56 | 54 | return err
|
57 | 55 | }
|
@@ -81,7 +79,7 @@ func GetQueryCmdKey() *cobra.Command {
|
81 | 79 | queryClient := types.NewQueryClient(clientCtx)
|
82 | 80 |
|
83 | 81 | res, err := queryClient.Key(
|
84 |
| - context.Background(), |
| 82 | + cmd.Context(), |
85 | 83 | &types.QueryKeyRequest{
|
86 | 84 | Key: args[0],
|
87 | 85 | },
|
@@ -118,7 +116,7 @@ func GetQueryCmdRewards() *cobra.Command {
|
118 | 116 | return err
|
119 | 117 | }
|
120 | 118 |
|
121 |
| - res, err := queryClient.Rewards(context.Background(), &types.QueryRewardsRequest{ |
| 119 | + res, err := queryClient.Rewards(cmd.Context(), &types.QueryRewardsRequest{ |
122 | 120 | LockerAddress: args[0],
|
123 | 121 | Pagination: pageReq,
|
124 | 122 | })
|
@@ -150,7 +148,7 @@ func GetQueryCmdReward() *cobra.Command {
|
150 | 148 |
|
151 | 149 | queryClient := types.NewQueryClient(clientCtx)
|
152 | 150 |
|
153 |
| - res, err := queryClient.Reward(context.Background(), &types.QueryRewardRequest{ |
| 151 | + res, err := queryClient.Reward(cmd.Context(), &types.QueryRewardRequest{ |
154 | 152 | LockerAddress: args[0],
|
155 | 153 | Key: args[1],
|
156 | 154 | })
|
@@ -186,7 +184,7 @@ func GetQueryCmdLocks() *cobra.Command {
|
186 | 184 | return err
|
187 | 185 | }
|
188 | 186 |
|
189 |
| - res, err := queryClient.Locks(context.Background(), &types.QueryLocksRequest{ |
| 187 | + res, err := queryClient.Locks(cmd.Context(), &types.QueryLocksRequest{ |
190 | 188 | LockerAddress: args[0],
|
191 | 189 | Pagination: pageReq,
|
192 | 190 | })
|
@@ -218,7 +216,7 @@ func GetQueryCmdLock() *cobra.Command {
|
218 | 216 |
|
219 | 217 | queryClient := types.NewQueryClient(clientCtx)
|
220 | 218 |
|
221 |
| - res, err := queryClient.Lock(context.Background(), &types.QueryLockRequest{ |
| 219 | + res, err := queryClient.Lock(cmd.Context(), &types.QueryLockRequest{ |
222 | 220 | LockerAddress: args[0],
|
223 | 221 | Key: args[1],
|
224 | 222 | })
|
|
0 commit comments