Skip to content

Commit dafc575

Browse files
committed
fix: always default to latest block
1 parent 8977772 commit dafc575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/provider/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ type BlockIdentifierObject =
4343
* @returns block identifier object
4444
*/
4545
export function getBlockIdentifier(blockIdentifier: BlockIdentifier): BlockIdentifierObject {
46-
if (blockIdentifier === null) {
47-
return { type: 'BLOCK_NUMBER', data: null };
46+
if (blockIdentifier === null || blockIdentifier === 'latest') {
47+
return { type: 'BLOCK_NUMBER', data: 'latest' }; // default to latest block
4848
}
4949
if (blockIdentifier === 'pending') {
5050
return { type: 'BLOCK_NUMBER', data: 'pending' };

0 commit comments

Comments
 (0)