Skip to content

Commit

Permalink
fix: extra validation on tax params
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Jan 13, 2025
1 parent 00a60d9 commit b5e9c4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/tax/typesv2/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ func validateFeeParams(v interface{}) error {
}

for _, feeParam := range feeParams {
err := validateContractAddress(feeParam.ProfitAddress)
if err != nil {
return errorsmod.Wrap(ErrInvalidFeeParam, err.Error())
}
if feeParam.ProfitAddress == "" || strings.TrimSpace(feeParam.ProfitAddress) == "" {
return ErrInvalidFeeParam
return errorsmod.Wrap(ErrInvalidFeeParam, "profit address cannot be blank")
}
for _, denomPrice := range feeParam.AcceptedDenomsMinPrices {
if denomPrice.Denom == "" || strings.TrimSpace(denomPrice.Denom) == "" ||
Expand Down

0 comments on commit b5e9c4e

Please sign in to comment.