Skip to content

Commit

Permalink
chore: comment validation func
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed May 13, 2024
1 parent 4153678 commit 63da50d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/forwarding/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func (gen *GenesisState) Validate() error {
return nil
}

// ValidateAllowedDenoms checks if a specified denom list is valid.
// It ensures that if a wildcard "*" is present, it must be the only item.
// It also ensures non-empty entries.
func ValidateAllowedDenoms(denoms []string) error {
if slices.Contains(denoms, "*") && len(denoms) > 1 {
return errors.New("wildcard can only be present by itself")
Expand Down

0 comments on commit 63da50d

Please sign in to comment.