fix(x/gov): fix typos in x/gov (#19088)

This commit is contained in:
Hemanth Sai 2024-01-17 21:35:37 +05:30 committed by GitHub
parent bf37398dda
commit 4e8d05b516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -1697,7 +1697,7 @@ func (suite *KeeperTestSuite) TestMsgUpdateParams() {
}
},
expErr: true,
expErrMsg: "quorom cannot be negative",
expErrMsg: "quorum cannot be negative",
},
{
name: "quorum > 1",
@ -1711,7 +1711,7 @@ func (suite *KeeperTestSuite) TestMsgUpdateParams() {
}
},
expErr: true,
expErrMsg: "quorom too large",
expErrMsg: "quorum too large",
},
{
name: "invalid threshold",

View File

@ -73,7 +73,7 @@ func TestValidateGenesis(t *testing.T) {
return v1.NewGenesisState(v1.DefaultStartingProposalID, params1)
},
expErrMsg: "quorom too large",
expErrMsg: "quorum too large",
},
{
name: "invalid threshold",

View File

@ -30,7 +30,7 @@ var (
DefaultProposalCancelDestAddress = ""
DefaultProposalCancelMaxPeriod = sdkmath.LegacyMustNewDecFromStr("0.5")
DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47)
DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47)
DefaultBurnVoteQuorum = false // set to false to replicate behavior of when this change was made (0.47)
DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47)
DefaultMinDepositRatio = sdkmath.LegacyMustNewDecFromStr("0.01")
DefaultOptimisticRejectedThreshold = sdkmath.LegacyMustNewDecFromStr("0.1")
@ -107,7 +107,7 @@ func DefaultParams() Params {
DefaultProposalCancelDestAddress,
DefaultProposalCancelMaxPeriod.String(),
DefaultBurnProposalPrevote,
DefaultBurnVoteQuorom,
DefaultBurnVoteQuorum,
DefaultBurnVoteVeto,
DefaultMinDepositRatio.String(),
DefaultOptimisticRejectedThreshold.String(),
@ -141,10 +141,10 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error {
return fmt.Errorf("invalid quorum string: %w", err)
}
if quorum.IsNegative() {
return fmt.Errorf("quorom cannot be negative: %s", quorum)
return fmt.Errorf("quorum cannot be negative: %s", quorum)
}
if quorum.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("quorom too large: %s", p.Quorum)
return fmt.Errorf("quorum too large: %s", p.Quorum)
}
threshold, err := sdkmath.LegacyNewDecFromStr(p.Threshold)