fix: Eth JSON-RPC API: empty EthBytes serializes to '0x'.

This commit is contained in:
Raúl Kripalani 2022-11-18 19:01:30 +00:00
parent 9c500e119c
commit ec667d49f4

View File

@ -81,7 +81,7 @@ type EthBytes []byte
func (e EthBytes) MarshalJSON() ([]byte, error) {
if len(e) == 0 {
return json.Marshal("0x00")
return json.Marshal("0x")
}
s := hex.EncodeToString(e)
if len(s)%2 == 1 {