MetaMask / eth-block-tracker

A JS module for keeping track of the latest Ethereum block by polling an ethereum provider
MIT License
131 stars 81 forks source link

types: add checkForLatestBlock to BlockTracker interface #184

Closed legobeat closed 11 months ago

legobeat commented 11 months ago

The checkForLatestBlock function is already implemented by both block tracker implementations and expected by users (https://github.com/MetaMask/core/blob/fc13dd4cebdd4dc56f4c8c2528a96249e871aaf2/packages/network-controller/src/create-auto-managed-network-client.test.ts#L169).

The function triggers an update for latest block and returns the result in the same format as getLatestBlock.