Skip to content

Commit

Permalink
fix: api-delegation post delegation validation
Browse files Browse the repository at this point in the history
  • Loading branch information
marthendalnunes committed Dec 10, 2024
1 parent 089f429 commit ea4bdb4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions apps/api-delegations/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ export const neverSchema = z.never().optional();
export const typeSchema = z.string().refine((val) => val.length > 0, {
message: 'invalid type',
});
export const hexSchema = z
.custom<Hex>()
.refine((val) => val.length === 66 && isHex(val), {
message: 'invalid hash',
});
export const hexSchema = z.custom<Hex>().refine((val) => isHex(val), {
message: 'invalid hash',
});
export const addressSchema = z.string().refine(isAddress, {
message: 'invalid address',
});
Expand Down

0 comments on commit ea4bdb4

Please sign in to comment.