diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index 8822688701..02468c65cf 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Unfinalized blocks not working with Cronos (#193) ## [3.1.1] - 2023-10-25 ### Fixed diff --git a/packages/node/src/ethereum/api.ethereum.ts b/packages/node/src/ethereum/api.ethereum.ts index 0cba4f9ea4..355d76e61e 100644 --- a/packages/node/src/ethereum/api.ethereum.ts +++ b/packages/node/src/ethereum/api.ethereum.ts @@ -223,7 +223,9 @@ export class EthereumApi implements ApiWrapper { } async getBestBlockHeight(): Promise { - const tag = this.supportsFinalization ? 'safe' : 'latest'; + // Cronos "safe" tag doesn't currently work as indended + const tag = + this.supportsFinalization && this.chainId !== 25 ? 'safe' : 'latest'; return (await this.client.getBlock(tag)).number; }