Skip to content

Commit a031535

Browse files
committed
fixed minor issues
1 parent 4b68904 commit a031535

File tree

17 files changed

+7
-45
lines changed

17 files changed

+7
-45
lines changed

client/docs/statik/statik.go

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/keys/parse.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package keys
22

33
import (
4-
"context"
54
"encoding/hex"
65
"errors"
76
"fmt"

simapp/simd/cmd/root.go

-20
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
6565
return rootCmd, encodingConfig
6666
}
6767

68-
// Execute executes the root command.
69-
func Execute(rootCmd *cobra.Command) error {
70-
// Create and set a client.Context on the command's Context. During the pre-run
71-
// of the root command, a default initialized client.Context is provided to
72-
// seed child command execution with values such as AccountRetriver, Keyring,
73-
// and a Tendermint RPC. This requires the use of a pointer reference when
74-
// getting and setting the client.Context. Ideally, we utilize
75-
// https://github.com/spf13/cobra/pull/1118.
76-
srvCtx := server.NewDefaultContext()
77-
ctx := rootCmd.Context()
78-
ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{})
79-
ctx = context.WithValue(ctx, server.ServerContextKey, srvCtx)
80-
81-
rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
82-
rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatJSON, "The logging format (json|plain)")
83-
84-
executor := tmcli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome)
85-
return executor.ExecuteContext(ctx)
86-
}
87-
8868
func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
8969
authclient.Codec = encodingConfig.Marshaler
9070

x/auth/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strings"
76

x/bank/client/testutil/cli_helpers.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package testutil
22

33
import (
4-
"context"
54
"fmt"
65

76
"github.com/spf13/cobra"

x/distribution/client/cli/query.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strconv"
76
"strings"
@@ -252,7 +251,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh
252251
}
253252

254253
// query for rewards from a particular delegation
255-
ctx := cmd.Context()
254+
ctx := cmd.Context()
256255
if len(args) == 2 {
257256
validatorAddr, err := sdk.ValAddressFromBech32(args[1])
258257
if err != nil {

x/distribution/client/cli/tx.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strings"
76

x/gov/client/cli/query.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strconv"
76
"strings"
@@ -208,7 +207,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
208207
}
209208

210209
// check to see if the proposal is in the store
211-
ctx := cmd.Context()
210+
ctx := cmd.Context()
212211
_, err = queryClient.Proposal(
213212
ctx,
214213
&types.QueryProposalRequest{ProposalId: proposalID},
@@ -221,7 +220,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
221220
if err != nil {
222221
return err
223222
}
224-
223+
225224
res, err := queryClient.Vote(
226225
ctx,
227226
&types.QueryVoteRequest{ProposalId: proposalID, Voter: args[1]},

x/ibc/applications/transfer/client/cli/query.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65

76
"github.com/spf13/cobra"
@@ -99,7 +98,7 @@ func GetCmdParams() *cobra.Command {
9998
queryClient := types.NewQueryClient(clientCtx)
10099

101100
res, _ := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{})
102-
return clientCtx.PrintOutput(res.Params)
101+
return clientCtx.PrintProto(res.Params)
103102
},
104103
}
105104

x/ibc/core/02-client/client/cli/query.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"errors"
65
"fmt"
76

@@ -251,7 +250,7 @@ func GetCmdParams() *cobra.Command {
251250
queryClient := types.NewQueryClient(clientCtx)
252251

253252
res, _ := queryClient.ClientParams(cmd.Context(), &types.QueryClientParamsRequest{})
254-
return clientCtx.PrintOutput(res.Params)
253+
return clientCtx.PrintProto(res.Params)
255254
},
256255
}
257256

x/ibc/core/03-connection/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65

76
"github.com/spf13/cobra"

x/ibc/core/04-channel/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strconv"
76

x/mint/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65

76
"github.com/spf13/cobra"

x/params/client/cli/query.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package cli
22

33
import (
4-
"context"
5-
64
"github.com/spf13/cobra"
75

86
"github.com/cosmos/cosmos-sdk/client"

x/slashing/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"strings"
65

76
"github.com/spf13/cobra"

x/staking/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65
"strconv"
76
"strings"

x/upgrade/client/cli/query.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cli
22

33
import (
4-
"context"
54
"fmt"
65

76
"github.com/spf13/cobra"

0 commit comments

Comments
 (0)