Skip to content

Commit d7a2297

Browse files
authored
Update: Validations (#599)
* Updates: Removed logs + queuedAt indexed * Update: More strict typing * updates * updates. accepted checksummed too
1 parent b699c6c commit d7a2297

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/server/schemas/wallet/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { Type } from "@sinclair/typebox";
33
export const walletHeaderSchema = Type.Object({
44
"x-backend-wallet-address": Type.String({
55
description: "Backend wallet address",
6+
maxLength: 42,
7+
minLength: 42,
8+
pattern: "^0x[0-9a-zA-Z]+",
69
}),
710
"x-idempotency-key": Type.Optional(
811
Type.String({
@@ -17,6 +20,9 @@ export const walletWithAAHeaderSchema = Type.Object({
1720
"x-account-address": Type.Optional(
1821
Type.String({
1922
description: "Smart account address",
23+
maxLength: 42,
24+
minLength: 42,
25+
pattern: "^0x[0-9a-zA-Z]+",
2026
}),
2127
),
2228
});
@@ -29,6 +35,9 @@ export const walletParamSchema = Type.Object({
2935
walletAddress: Type.String({
3036
examples: ["0x..."],
3137
description: "Backend wallet address",
38+
maxLength: 42,
39+
minLength: 42,
40+
pattern: "^0x[0-9a-zA-Z]+",
3241
}),
3342
});
3443

0 commit comments

Comments
 (0)