diff --git a/x/marketplace/types/constants.go b/x/marketplace/types/constants.go index 9d0d41b1..21fa44ca 100644 --- a/x/marketplace/types/constants.go +++ b/x/marketplace/types/constants.go @@ -1,8 +1,7 @@ package types const ( - MinListingIdLength = 4 - MaxListingIdLength = 64 - MaxSplits = 5 - MaxWhitelistAccounts = 10 + MinListingIdLength = 4 + MaxListingIdLength = 64 + MaxSplits = 5 ) diff --git a/x/marketplace/types/validation.go b/x/marketplace/types/validation.go index fb29a09b..d775f792 100644 --- a/x/marketplace/types/validation.go +++ b/x/marketplace/types/validation.go @@ -79,10 +79,6 @@ func ValidateSplitShares(splitShares []WeightedAddress) error { } func ValidateWhiteListAccounts(whitelistAccounts []string) error { - if len(whitelistAccounts) > MaxWhitelistAccounts { - return errorsmod.Wrapf(ErrInvalidWhitelistAccounts, - "number of whitelist accounts are more than the limit, len must be less than or equal to %d ", MaxWhitelistAccounts) - } for _, address := range whitelistAccounts { _, err := sdk.AccAddressFromBech32(address) if err != nil { diff --git a/x/onft/types/validations.go b/x/onft/types/validations.go index 0cd40e16..cf37c407 100644 --- a/x/onft/types/validations.go +++ b/x/onft/types/validations.go @@ -141,12 +141,9 @@ func ValidateWeightedAddresses(i interface{}) error { weightSum := sdk.NewDec(0) for i, w := range v { - // we allow address to be "" to go to community pool - if w.Address != "" { - _, err := sdk.AccAddressFromBech32(w.Address) - if err != nil { - return fmt.Errorf("invalid address at %dth", i) - } + _, err := sdk.AccAddressFromBech32(w.Address) + if err != nil { + return fmt.Errorf("invalid address at %dth", i) } if !w.Weight.IsPositive() { return fmt.Errorf("non-positive weight at %dth", i)