From 75863fad6593224150cd549b487b5ac0701c84b5 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 15 Nov 2023 08:51:25 +0100 Subject: [PATCH] nits --- client/prompt_validation.go | 2 +- client/v2/autocli/msg.go | 4 ++-- client/v2/internal/prompt/validation.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/prompt_validation.go b/client/prompt_validation.go index dc793fc9082d..288a1c95ef72 100644 --- a/client/prompt_validation.go +++ b/client/prompt_validation.go @@ -47,7 +47,7 @@ func ValidatePromptAddress(input string) error { // TODO(@julienrbrt) remove and return fmt.Errorf("invalid address: %w", err) } -// ValidatePromptCoins validates that the input is a valid sdk.Coins +// ValidatePromptCoins validates that the input contains valid sdk.Coins func ValidatePromptCoins(input string) error { if _, err := sdk.ParseCoinsNormalized(input); err != nil { return fmt.Errorf("invalid coins: %w", err) diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 69660ac3a576..c863dba4e1c2 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -209,7 +209,7 @@ func (b *Builder) BuildMsgMethodCommand(descriptor protoreflect.MethodDescriptor cmd.Flags().Bool(flags.FlagNoProposal, false, "Skip gov proposal and submit a normal transaction") } - return cmd, err + return cmd, nil } // handleGovProposal sets the authority field of the message to the gov module address and creates a gov proposal. @@ -231,7 +231,7 @@ func (b *Builder) handleGovProposal( signerFromFlag := clientCtx.GetFromAddress() signer, err := addressCodec.BytesToString(signerFromFlag.Bytes()) if err != nil { - return fmt.Errorf("failed to set signer on message, got %v: %w", signerFromFlag, err) + return fmt.Errorf("failed to set signer on message, got %q: %w", signerFromFlag, err) } proposal, err := govcli.ReadGovPropCmdFlags(signer, cmd.Flags()) diff --git a/client/v2/internal/prompt/validation.go b/client/v2/internal/prompt/validation.go index 687751ec685e..8a6e5a2d334f 100644 --- a/client/v2/internal/prompt/validation.go +++ b/client/v2/internal/prompt/validation.go @@ -26,7 +26,7 @@ func ValidatePromptURL(input string) error { return nil } -// ValidatePromptCoins validates that the input is a valid sdk.Coins +// ValidatePromptCoins validates that the input contains valid sdk.Coins func ValidatePromptCoins(input string) error { if _, err := sdk.ParseCoinsNormalized(input); err != nil { return fmt.Errorf("invalid coins: %w", err)