Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Nov 13, 2024
1 parent 4d47bc4 commit 879db32
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions client/v2/autocli/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ func (b *Builder) handleGovProposal(
}

// generateOrBroadcastTxWithV2 generates or broadcasts a transaction with the provided messages using v2 transaction handling.
//
//nolint:unused // It'll be used once BuildMsgMethodCommand is updated to use factory v2.
func (b *Builder) generateOrBroadcastTxWithV2(cmd *cobra.Command, msgs ...transaction.Msg) error {
k, err := keyring.NewKeyringFromFlags(cmd.Flags(), b.AddressCodec, cmd.InOrStdin(), b.Cdc)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion client/v2/offchain/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func SignFile() *cobra.Command {

keyringBackend := c.KeyringBackend
if !cmd.Flags().Changed(flags.FlagKeyringBackend) {
cmd.Flags().Set(flags.FlagKeyringBackend, keyringBackend)
_ = cmd.Flags().Set(flags.FlagKeyringBackend, keyringBackend)
}

bz, err := os.ReadFile(args[1])
Expand Down
6 changes: 2 additions & 4 deletions client/v2/tx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,8 @@ func validateFlagSet(flags *pflag.FlagSet, offline bool) error {
if gasSetting.Simulate {
return errors.New("simulate and offline flags cannot be set at the same time")
}
} else {
if chainID == "" {
return errors.New("chain ID required but not specified")
}
} else if chainID == "" {
return errors.New("chain ID required but not specified")
}

return nil
Expand Down
1 change: 0 additions & 1 deletion client/v2/tx/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"os"


"github.com/cosmos/gogoproto/grpc"
"github.com/cosmos/gogoproto/proto"
"github.com/spf13/pflag"
Expand Down
6 changes: 5 additions & 1 deletion simapp/simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ func NewRootCmd() *cobra.Command {
}

autoCliOpts := tempApp.AutoCliOpts()
autoCliOpts.ClientCtx = initClientCtx
autoCliOpts.InterfaceRegistry = initClientCtx.InterfaceRegistry
autoCliOpts.AddressCodec = initClientCtx.AddressCodec
autoCliOpts.ValidatorAddressCodec = initClientCtx.ValidatorAddressCodec
autoCliOpts.ConsensusAddressCodec = initClientCtx.ConsensusAddressCodec
autoCliOpts.Cdc = initClientCtx.Codec

nodeCmds := nodeservice.NewNodeCommands()
autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions()
Expand Down

0 comments on commit 879db32

Please sign in to comment.