From 2af7204d5ad975d4ba3a70341750331d13654b5e Mon Sep 17 00:00:00 2001 From: Scott Twiname Date: Fri, 27 Oct 2023 11:03:04 +1300 Subject: [PATCH 1/2] Skip using safe tag for cronos --- packages/node/src/ethereum/api.ethereum.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } From bf56cf2aa75b70bb05bfd1d7f84396ec0639cada Mon Sep 17 00:00:00 2001 From: Scott Twiname Date: Fri, 27 Oct 2023 11:06:21 +1300 Subject: [PATCH 2/2] Update changelog --- packages/node/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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