diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index 2e6ccded90e..d465dcbc29b 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -164,6 +164,10 @@ func ValidatePrefixedDenom(denom string) error { // - A valid base denomination (eg: 'uatom') // - A valid fungible token representation (i.e 'ibc/{hash}') per ADR 001 https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-001-coin-source-tracing.md func ValidateIBCDenom(denom string) error { + if err := sdk.ValidateDenom(denom); err != nil { + return err + } + denomSplit := strings.SplitN(denom, "/", 2) switch { @@ -173,7 +177,7 @@ func ValidateIBCDenom(denom string) error { return sdkerrors.Wrapf(ErrInvalidDenomForTransfer, "denomination should be prefixed with the format 'ibc/{hash(trace + \"/\" + %s)}'", denom) case denomSplit[0] == denom && strings.TrimSpace(denom) != "": - return sdk.ValidateDenom(denom) + return nil } if _, err := ParseHexHash(denomSplit[1]); err != nil {