Skip to content

Commit

Permalink
Update: Validations (#599)
Browse files Browse the repository at this point in the history
* Updates: Removed logs + queuedAt indexed

* Update: More strict typing

* updates

* updates. accepted checksummed too
  • Loading branch information
farhanW3 authored Aug 8, 2024
1 parent b699c6c commit d7a2297
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/server/schemas/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { Type } from "@sinclair/typebox";
export const walletHeaderSchema = Type.Object({
"x-backend-wallet-address": Type.String({
description: "Backend wallet address",
maxLength: 42,
minLength: 42,
pattern: "^0x[0-9a-zA-Z]+",
}),
"x-idempotency-key": Type.Optional(
Type.String({
Expand All @@ -17,6 +20,9 @@ export const walletWithAAHeaderSchema = Type.Object({
"x-account-address": Type.Optional(
Type.String({
description: "Smart account address",
maxLength: 42,
minLength: 42,
pattern: "^0x[0-9a-zA-Z]+",
}),
),
});
Expand All @@ -29,6 +35,9 @@ export const walletParamSchema = Type.Object({
walletAddress: Type.String({
examples: ["0x..."],
description: "Backend wallet address",
maxLength: 42,
minLength: 42,
pattern: "^0x[0-9a-zA-Z]+",
}),
});

Expand Down

0 comments on commit d7a2297

Please sign in to comment.