Skip to content

Commit

Permalink
fix(store-indexer): allow empty env variable (#2746)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs authored Apr 26, 2024
1 parent 65aa32c commit 9c599b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .changeset/eighty-actors-live.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"@latticexyz/store-indexer": patch
---

Added support for passing in an empty `STORE_ADDRESS=` environment variable.
Added support for an empty `STORE_ADDRESS=` environment variable.
This previously would fail the input validation, now it behaves the same way as not setting the `STORE_ADDRESS` variable at all.
3 changes: 1 addition & 2 deletions packages/store-indexer/bin/parseEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export const indexerEnvSchema = z.intersection(
POLLING_INTERVAL: z.coerce.number().positive().default(1000),
STORE_ADDRESS: z
.string()
.transform((input) => (input === "" ? undefined : input))
.refine(isHex)
.refine((value) => value === "" || isHex(value))
.optional(),
}),
z.union([
Expand Down

0 comments on commit 9c599b8

Please sign in to comment.