Skip to content

Commit

Permalink
fix: from > to should compare with number type, not string (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Apr 28, 2023
1 parent 5e678b1 commit fa5d78a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web3/packages/api-server/src/methods/modules/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ export class Eth {
fromBlock.startsWith("0x") &&
typeof toBlock === "string" &&
toBlock.startsWith("0x") &&
fromBlock > toBlock
BigInt(fromBlock) > BigInt(toBlock)
) {
throw new HeaderNotFoundError(
`invalid from and to block combination: from > to`
Expand Down

0 comments on commit fa5d78a

Please sign in to comment.