Skip to content

Commit 50bab48

Browse files
committed
feat: enhance validation for SAFE_PROPOSER_PRIVATE_KEY in environment configuration
1 parent cb52719 commit 50bab48

File tree

1 file changed

+2
-1
lines changed
  • propose-safe-multisig-tx/src

1 file changed

+2
-1
lines changed

propose-safe-multisig-tx/src/env.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const envSchema = z.object({
4545
SAFE_PROPOSER_PRIVATE_KEY: z
4646
.string()
4747
.regex(privateKeyRegex, "Invalid private key format")
48-
.min(1, "Safe proposer private key is required"),
48+
.min(1, "Safe proposer private key is required")
49+
.transform((val) => (val.startsWith("0x") ? val : `0x${val}`)),
4950

5051
// Safe API key for transaction service
5152
SAFE_API_KEY: z.string().min(1, "Safe API key is required"),

0 commit comments

Comments
 (0)