Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Update CmdSubmitTopLevelDomainProposal
Browse files Browse the repository at this point in the history
  • Loading branch information
foxytanuki committed Feb 1, 2024
1 parent 2016ece commit 4104306
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions x/registry/client/cli/tx_submit_top_level_domain_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/address"
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"

Check failure on line 13 in x/registry/client/cli/tx_submit_top_level_domain_proposal.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos) -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cosmos/gaia) -s prefix(github.com/mycel-domain/mycel) --custom-order (gci)
"github.com/mycel-domain/mycel/x/registry/types"
"github.com/spf13/cast"
Expand All @@ -19,7 +20,7 @@ var _ = strconv.Itoa(0)

func CmdSubmitTopLevelDomainProposal() *cobra.Command {
cmd := &cobra.Command{
Use: "submit-top-level-domain-proposal [name] [registration-period-in-year]",
Use: "submit-top-level-domain-proposal [name] [registration-period-in-year] [flags]",
Short: "Broadcast message submit-top-level-domain-proposal",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {
Expand All @@ -43,7 +44,7 @@ func CmdSubmitTopLevelDomainProposal() *cobra.Command {
}

msg := types.NewMsgSubmitTopLevelDomainProposal(
clientCtx.GetFromAddress().String(),
sdk.AccAddress(address.Module("gov")).String(),
argName,
argRegistrationPeriodInYear,
)
Expand All @@ -59,7 +60,10 @@ func CmdSubmitTopLevelDomainProposal() *cobra.Command {
},
}

// add common proposal flags
flags.AddTxFlagsToCmd(cmd)
cli.AddGovPropFlagsToCmd(cmd)
cmd.MarkFlagRequired(cli.FlagTitle)

Check failure on line 66 in x/registry/client/cli/tx_submit_top_level_domain_proposal.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)

return cmd
}

0 comments on commit 4104306

Please sign in to comment.