Added finalized and safe blockTags (#3091).

This commit is contained in:
Richard Moore 2022-08-11 15:03:02 -04:00
parent e72d13e651
commit 549168cc4d

View File

@ -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)) {