diff --git a/x/coredaos/keeper/msg_server.go b/x/coredaos/keeper/msg_server.go index 54215bb9..5eb1b8c4 100644 --- a/x/coredaos/keeper/msg_server.go +++ b/x/coredaos/keeper/msg_server.go @@ -48,7 +48,7 @@ func (ms MsgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdatePara } if delegatorBonded.GT(math.ZeroInt()) || delegatorUnbonded.GT(math.ZeroInt()) { - return nil, types.ErrCannotStake.Wrapf("cannot update params while Steering DAO have bonded or unbonding tokens") + return nil, types.ErrCannotStake.Wrapf("cannot update params while Steering DAO has bonded or unbonding tokens") } } if params.OversightDaoAddress != "" { @@ -62,7 +62,7 @@ func (ms MsgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdatePara } if delegatorBonded.GT(math.ZeroInt()) || delegatorUnbonded.GT(math.ZeroInt()) { - return nil, types.ErrCannotStake.Wrapf("cannot update params while Oversight DAO have bonded or unbonding tokens") + return nil, types.ErrCannotStake.Wrapf("cannot update params while Oversight DAO has bonded or unbonding tokens") } } if err := ms.k.Params.Set(ctx, params); err != nil { diff --git a/x/coredaos/keeper/msg_server_test.go b/x/coredaos/keeper/msg_server_test.go index 86a10916..be5e22cd 100644 --- a/x/coredaos/keeper/msg_server_test.go +++ b/x/coredaos/keeper/msg_server_test.go @@ -75,7 +75,7 @@ func TestMsgServerUpdateParams(t *testing.T) { VotingPeriodExtensionDuration: &timeDuration, }, }, - expectedErr: "cannot update params while Steering DAO have bonded or unbonding tokens: core DAOs cannot stake", + expectedErr: "cannot update params while Steering DAO has bonded or unbonding tokens: core DAOs cannot stake", setupMocks: func(ctx sdk.Context, m *testutil.Mocks) { m.StakingKeeper.EXPECT().GetDelegatorBonded(ctx, sdk.MustAccAddressFromBech32(bondedAcc)).Return(math.NewInt(10), nil) m.StakingKeeper.EXPECT().GetDelegatorUnbonding(ctx, sdk.MustAccAddressFromBech32(bondedAcc)).Return(math.NewInt(0), nil) @@ -90,7 +90,7 @@ func TestMsgServerUpdateParams(t *testing.T) { VotingPeriodExtensionDuration: &timeDuration, }, }, - expectedErr: "cannot update params while Oversight DAO have bonded or unbonding tokens: core DAOs cannot stake", + expectedErr: "cannot update params while Oversight DAO has bonded or unbonding tokens: core DAOs cannot stake", setupMocks: func(ctx sdk.Context, m *testutil.Mocks) { m.StakingKeeper.EXPECT().GetDelegatorBonded(ctx, sdk.MustAccAddressFromBech32(bondedAcc)).Return(math.NewInt(10), nil) m.StakingKeeper.EXPECT().GetDelegatorUnbonding(ctx, sdk.MustAccAddressFromBech32(bondedAcc)).Return(math.NewInt(0), nil) @@ -129,7 +129,7 @@ func TestMsgServerUpdateParams(t *testing.T) { VotingPeriodExtensionDuration: &timeDuration, }, }, - expectedErr: "cannot update params while Steering DAO have bonded or unbonding tokens: core DAOs cannot stake", + expectedErr: "cannot update params while Steering DAO has bonded or unbonding tokens: core DAOs cannot stake", setupMocks: func(ctx sdk.Context, m *testutil.Mocks) { // Address is in unbonding m.StakingKeeper.EXPECT().GetDelegatorBonded(ctx, sdk.MustAccAddressFromBech32(unbondingAcc)).Return(math.NewInt(0), nil) @@ -145,7 +145,7 @@ func TestMsgServerUpdateParams(t *testing.T) { VotingPeriodExtensionDuration: &timeDuration, }, }, - expectedErr: "cannot update params while Oversight DAO have bonded or unbonding tokens: core DAOs cannot stake", + expectedErr: "cannot update params while Oversight DAO has bonded or unbonding tokens: core DAOs cannot stake", setupMocks: func(ctx sdk.Context, m *testutil.Mocks) { // Address is in unbonding m.StakingKeeper.EXPECT().GetDelegatorBonded(ctx, sdk.MustAccAddressFromBech32(unbondingAcc)).Return(math.NewInt(0), nil) diff --git a/x/gov/types/v1/governor.go b/x/gov/types/v1/governor.go index 63f795fd..8bf2fb45 100644 --- a/x/gov/types/v1/governor.go +++ b/x/gov/types/v1/governor.go @@ -100,7 +100,7 @@ func (d GovernorDescription) UpdateDescription(d2 GovernorDescription) (Governor ).EnsureLength() } -// EnsureLength ensures the length of a vovernor's description. +// EnsureLength ensures the length of a governor's description. func (d GovernorDescription) EnsureLength() (GovernorDescription, error) { if len(d.Moniker) > stakingtypes.MaxMonikerLength { return d, errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid moniker length; got: %d, max: %d", len(d.Moniker), stakingtypes.MaxMonikerLength) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 90e7aa38..7a6d150b 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -54,7 +54,7 @@ var ( DefaultLawThreshold = math.LegacyNewDecWithPrec(9, 1) // DefaultMinInitialDepositRatio = math.LegacyZeroDec() 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) DefaultMinDepositRatio = math.LegacyNewDecWithPrec(1, 2) // NOTE: backport from v50 DefaultQuorumTimeout time.Duration = DefaultVotingPeriod - (time.Hour * 24 * 1) // disabled by default (DefaultQuorumCheckCount must be set to a non-zero value to enable) @@ -183,7 +183,7 @@ func DefaultParams() Params { DefaultLawThreshold.String(), // DefaultMinInitialDepositRatio.String(), DefaultBurnProposalPrevote, - DefaultBurnVoteQuorom, + DefaultBurnVoteQuorum, DefaultMinDepositRatio.String(), DefaultQuorumTimeout, DefaultMaxVotingPeriodExtension, @@ -324,13 +324,13 @@ func (p Params) ValidateBasic() error { // minInitialDepositRatio, err := math.LegacyNewDecFromStr(p.MinInitialDepositRatio) // if err != nil { - // return fmt.Errorf("invalid mininum initial deposit ratio of proposal: %w", err) + // return fmt.Errorf("invalid minimum initial deposit ratio of proposal: %w", err) // } // if minInitialDepositRatio.IsNegative() { - // return fmt.Errorf("mininum initial deposit ratio of proposal must be positive: %s", minInitialDepositRatio) + // return fmt.Errorf("minimum initial deposit ratio of proposal must be positive: %s", minInitialDepositRatio) // } // if minInitialDepositRatio.GT(math.LegacyOneDec()) { - // return fmt.Errorf("mininum initial deposit ratio of proposal is too large: %s", minInitialDepositRatio) + // return fmt.Errorf("minimum initial deposit ratio of proposal is too large: %s", minInitialDepositRatio) // } if len(p.MinInitialDepositRatio) > 0 { return fmt.Errorf("manually setting min initial deposit ratio is deprecated in favor of a dynamic min initial deposit") @@ -338,13 +338,13 @@ func (p Params) ValidateBasic() error { minDepositRatio, err := math.LegacyNewDecFromStr(p.MinDepositRatio) if err != nil { - return fmt.Errorf("invalid mininum deposit ratio of proposal: %w", err) + return fmt.Errorf("invalid minimum deposit ratio of proposal: %w", err) } if minDepositRatio.IsNegative() { - return fmt.Errorf("mininum deposit ratio of proposal must be positive: %s", minDepositRatio) + return fmt.Errorf("minimum deposit ratio of proposal must be positive: %s", minDepositRatio) } if minDepositRatio.GT(math.LegacyOneDec()) { - return fmt.Errorf("mininum deposit ratio of proposal is too large: %s", minDepositRatio) + return fmt.Errorf("minimum deposit ratio of proposal is too large: %s", minDepositRatio) } if p.QuorumCheckCount > 0 { diff --git a/x/gov/types/v1/params_legacy.go b/x/gov/types/v1/params_legacy.go index 91128901..b2b2df5f 100644 --- a/x/gov/types/v1/params_legacy.go +++ b/x/gov/types/v1/params_legacy.go @@ -53,10 +53,10 @@ func validateTallyParams(i any) 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(math.LegacyOneDec()) { - return fmt.Errorf("quorom too large: %s", v) + return fmt.Errorf("quorum too large: %s", v) } threshold, err := math.LegacyNewDecFromStr(v.Threshold)