Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Le-Caignec committed Jan 3, 2025
1 parent a5c36df commit 414deaa
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ const privateKeyRegex = /^([a-fA-F0-9]{64})$/;
const envSchema = z.object({
IEXEC_VOUCHER_MANAGER_ACCOUNT_INDEX: z
.string()
.optional()
.refine(
(val) => val === undefined || numericRegex.test(val),
'Must be a numeric index if provided',
),
.refine((val) => numericRegex.test(val), 'Must be a numeric index if provided')
.optional(),
IEXEC_VOUCHER_MINTER_ACCOUNT_INDEX: z
.string()
.optional()
.refine(
(val) => val === undefined || numericRegex.test(val),
'Must be a numeric index if provided',
),
.refine((val) => numericRegex.test(val), 'Must be a numeric index if provided')
.optional(),
IS_LOCAL_FORK: z.preprocess(
(val) => typeof val === 'string' && val.toLowerCase() === 'true',
z.boolean().default(false),
Expand Down

0 comments on commit 414deaa

Please sign in to comment.