fix: make submit-legacy-proposal --type field not case-sensitive (#11967)

This commit is contained in:
Julien Robert
2022-05-16 09:49:20 -04:00
committed by GitHub
parent ac9754f367
commit 542e9f07cd
5 changed files with 53 additions and 13 deletions
+5 -1
View File
@@ -180,7 +180,11 @@ $ %s tx gov submit-legacy-proposal --title="Test Proposal" --description="My awe
return err
}
content := v1beta1.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type)
content, ok := v1beta1.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type)
if !ok {
return fmt.Errorf("failed to create proposal content: unknown proposal type %s", proposal.Type)
}
msg, err := v1beta1.NewMsgSubmitProposal(content, amount, clientCtx.GetFromAddress())
if err != nil {
return fmt.Errorf("invalid message: %w", err)