diff --git a/x/tokenomics/keeper/params_test.go b/x/tokenomics/keeper/params_test.go index 668750376..1b583b481 100644 --- a/x/tokenomics/keeper/params_test.go +++ b/x/tokenomics/keeper/params_test.go @@ -19,6 +19,11 @@ func TestParams_ValidateMintAllocationDao(t *testing.T) { mintAllocatioDao: "0", expectedErr: tokenomicstypes.ErrTokenomicsParamInvalid.Wrap("invalid parameter type: string"), }, + { + desc: "invalid MintAllocationDao (<0)", + mintAllocatioDao: -0.1, + expectedErr: tokenomicstypes.ErrTokenomicsParamInvalid.Wrapf("mint allocation to DAO must be greater than or equal to 0: got %f", -0.1), + }, { desc: "valid MintAllocationDao", mintAllocatioDao: tokenomicstypes.DefaultMintAllocationDao, @@ -48,6 +53,11 @@ func TestParams_ValidateMintAllocationProposer(t *testing.T) { mintAllocatioProposer: "0", expectedErr: tokenomicstypes.ErrTokenomicsParamInvalid.Wrap("invalid parameter type: string"), }, + { + desc: "invalid MintAllocationProposer (<0)", + mintAllocatioProposer: -0.1, + expectedErr: tokenomicstypes.ErrTokenomicsParamInvalid.Wrapf("mint allocation to proposer must be greater than or equal to 0: got %f", -0.1), + }, { desc: "valid MintAllocationProposer", mintAllocatioProposer: tokenomicstypes.DefaultMintAllocationProposer, diff --git a/x/tokenomics/types/params.go b/x/tokenomics/types/params.go index 5c2501f41..06923e61b 100644 --- a/x/tokenomics/types/params.go +++ b/x/tokenomics/types/params.go @@ -90,7 +90,7 @@ func ValidateMintAllocationProposer(mintAllocationProposer any) error { } if mintAllocationProposerFloat < 0 { - return ErrTokenomicsParamInvalid.Wrapf("mint allocation to Proposer must be greater than or equal to 0: got %f", mintAllocationProposerFloat) + return ErrTokenomicsParamInvalid.Wrapf("mint allocation to proposer must be greater than or equal to 0: got %f", mintAllocationProposerFloat) } return nil