From 7b4643403d2e7c245ef163dc8c108d2511707ff9 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Thu, 27 Apr 2023 17:18:18 +0800 Subject: [PATCH] fix: from > to should compare with number type, not string --- 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`