From c637c7b915932b451845fee46e3ecf1b9053f678 Mon Sep 17 00:00:00 2001 From: span14 Date: Wed, 30 Nov 2022 23:21:35 -0500 Subject: [PATCH] fix switch case issue --- rpc/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpc/types.go b/rpc/types.go index 6aa7d239b9..57f13e0354 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -128,7 +128,7 @@ const ( ) // UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: -// - "latest", "earliest" or "pending" as string arguments +// - "latest", "earliest", "pending" and "confirmed" as string arguments // - the block number // Returned errors: // - an invalid block number error when the given argument isn't a known strings @@ -147,6 +147,7 @@ func (bn *BlockNumber) UnmarshalJSON(data []byte) error { return nil case "confirmed": *bn = ConfirmedBlockNumber + return nil } blckNum, err := hexutil.DecodeUint64(input)