fix switch case issue

This commit is contained in:
span14 2022-11-30 23:21:35 -05:00
parent abb0dcc48b
commit c637c7b915

View file

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