From fa5d78a57c7fac982aa8c942c1e7fb1d3602e876 Mon Sep 17 00:00:00 2001 From: CL Date: Fri, 28 Apr 2023 12:19:53 +0800 Subject: [PATCH] fix: from > to should compare with number type, not string (#1063) --- web3/packages/api-server/src/methods/modules/eth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web3/packages/api-server/src/methods/modules/eth.ts b/web3/packages/api-server/src/methods/modules/eth.ts index b78f68e85..aba36a524 100644 --- a/web3/packages/api-server/src/methods/modules/eth.ts +++ b/web3/packages/api-server/src/methods/modules/eth.ts @@ -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`