Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Releases: MetaMask/eth-block-tracker

13.0.0

15 Oct 21:01
18b6dc9

Choose a tag to compare

Changed

  • BREAKING: Distribute separate CommonJS and ESM files (#351)
    • Use the exports field of package.json, breaking some previously valid imports.

12.2.1

14 Oct 20:00
7b12694

Choose a tag to compare

Fixed

  • PollingBlockTracker.checkForLatestBlock() and getLatestBlock() now clear the cached block after blockReset duration when called and the PollingBlockTracker is not polling. (#348)

12.2.0

08 Oct 19:05
1129105

Choose a tag to compare

Changed

  • PollingBlockTracker.getLatestBlock() now accepts an optional parameter useCache (#340)
    • This option defaults to true, but when false, it ignores the cached block number and instead updates and returns a new block number, ensuring that the frequency of requests is limited to the pollingInterval period

12.1.0

24 Sep 14:57
a4a1138

Choose a tag to compare

Changed

  • Bump @metamask/eth-json-rpc-provider from ^4.1.5 to ^5.0.0 (#334)

12.0.1

28 May 23:35
83500e7

Choose a tag to compare

Fixed

  • Fixed hanging getLatestBlock() promises when block tracker is stopped before request completion (#320)
    • Pending getLatestBlock() requests are now properly rejected with "Block tracker destroyed" error when the tracker is stopped

12.0.0

23 May 22:02
4972411

Choose a tag to compare

Changed

  • Errors that occur while polling are no longer wrapped (#310)

Removed

  • BREAKING: Remove SubscribeBlockTracker (#309)
    • Although we continue to maintain this, we have not used it internally for quite some time. In general we have found a polling-based approval to be reliable than a subscription-based approach. We recommend using PollingBlockTracker instead.

Fixed

  • Fix PollingBlockTracker.getLatestBlock so that it throws an error encountered while making the request instead of hanging, regardless of whether the request occurs inside or outside of a polling loop (#313)
  • Fix PollingBlockTracker.getLatestBlock so that if invoked while a previous invocation is pending, it will throw if that invocation also throws (#313)

11.0.4

18 Dec 17:58
4596e7e

Choose a tag to compare

Changed

  • Bump @metamask/utils from ^9.1.0 to ^11.0.1 (#297)

11.0.3

04 Dec 12:51
784421b

Choose a tag to compare

Fixed

  • Avoid risk of infinite retry loops when fetching new blocks (#284)
    • When the provider returns an error and PollingBlockTracker or SubscribeBlockTracker is destroyed, the promise returned by the getLatestBlock method will be rejected.

11.0.2

18 Oct 12:27
bdc65fc

Choose a tag to compare

Fixed

  • Bump @metamask/eth-json-rpc-provider from ^4.1.1 to ^4.1.5 (#273)

11.0.1

23 Jul 13:51
9a2cb19

Choose a tag to compare

Changed

  • Bump @metamask/eth-json-rpc-provider from ^4.1.0 to ^4.1.1 (#261)
  • Bump @metamask/safe-event-emitter from ^3.0.0 to ^3.1.1 (#261)
  • Bump @metamask/utils from ^8.1.0 to ^9.1.0 (#261)