Skip to content

Commit

Permalink
remove overhang from previous round :)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyv1987 committed Oct 26, 2023
1 parent 31740f7 commit d95f0e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nym-wallet/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ export const validateAmount = async (
};

export const isValidHostname = (value: string) => {
const trimmedValue = value.trim();

const hostnameSchema = Joi.alternatives().try(
Joi.string().hostname(),
Joi.string().ip({ version: ['ipv4', 'ipv6'] }),
);

const result = hostnameSchema.validate(trimmedValue);
const result = hostnameSchema.validate(value);
return !result.error;
};

Expand Down

0 comments on commit d95f0e6

Please sign in to comment.