hashgraph / hedera-json-rpc-relay

Implementation of Ethereum JSON-RPC APIs for Hedera
Apache License 2.0
48 stars 62 forks source link

Update `eth_getBalance` to pass block timestamp for account queries #3039

Closed victor-yanev closed 2 days ago

victor-yanev commented 2 days ago

Update the eth_getBalance method to use the timestamp of the block when calling getAccountPageLimit if a non-null blockNumberOrTagOrHash is passed. If no block number or tag is provided, the method should pass the timestamp of the already fetched latestBlock instead. This update ensures that account balance queries adhere to the new mirror node REST API changes, which now limit data queries to a 60-day time range.

victor-yanev commented 2 days ago

Closed because no changes are needed for eth_getBalance. Only the transactions list in the response from accounts/{id} endpoint would be empty if the account has no transactions in the past 60 days. Everything else reflects what it should be.

When the blockNumberOrTagOrHash is: