We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8977772 commit dafc575Copy full SHA for dafc575
src/provider/utils.ts
@@ -43,8 +43,8 @@ type BlockIdentifierObject =
43
* @returns block identifier object
44
*/
45
export function getBlockIdentifier(blockIdentifier: BlockIdentifier): BlockIdentifierObject {
46
- if (blockIdentifier === null) {
47
- return { type: 'BLOCK_NUMBER', data: null };
+ if (blockIdentifier === null || blockIdentifier === 'latest') {
+ return { type: 'BLOCK_NUMBER', data: 'latest' }; // default to latest block
48
}
49
if (blockIdentifier === 'pending') {
50
return { type: 'BLOCK_NUMBER', data: 'pending' };
0 commit comments