Skip to content

Commit

Permalink
Added finalized and safe blockTags (#3091).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Aug 11, 2022
1 parent e72d13e commit 549168c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/providers/src.ts/formatter.ts
Expand Up @@ -250,8 +250,10 @@ export class Formatter {

if (blockTag === "earliest") { return "0x0"; }

if (blockTag === "latest" || blockTag === "pending") {
return blockTag;
switch (blockTag) {
case "earliest": return "0x0";
case "latest": case "pending": case "safe": case "finalized":
return blockTag;
}

if (typeof(blockTag) === "number" || isHexString(blockTag)) {
Expand Down

0 comments on commit 549168c

Please sign in to comment.