Skip to content

Commit

Permalink
change regex
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 committed Jan 19, 2023
1 parent e74a683 commit 9fdec83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/validator/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TYPES = {
error: Constants.BLOCK_HASH_ERROR
},
'blockNumber': {
test: (param: string) => /^0[xX]([1-9A-Fa-f]+[0-9A-Fa-f]{0,13}|0)$/.test(param) && Number.MAX_SAFE_INTEGER >= Number(param) || ["earliest", "latest", "pending"].includes(param),
test: (param: string) => /^0[xX]([1-9A-Fa-f][0-9A-Fa-f]{0,13}|0)$/.test(param) && Number.MAX_SAFE_INTEGER >= Number(param) || ["earliest", "latest", "pending"].includes(param),
error: Constants.BLOCK_NUMBER_ERROR
},
'boolean': {
Expand Down

0 comments on commit 9fdec83

Please sign in to comment.