Skip to content

Commit d10fdba

Browse files
committed
fix json
1 parent 6c734fb commit d10fdba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x/evm/types/eth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (tx *EthereumTx) Unmarshal(dst []byte) error {
4949

5050
func (tx *EthereumTx) UnmarshalJSON(bz []byte) error {
5151
var data hexutil.Bytes
52-
if err := json.Unmarshal(bz, &bz); err != nil {
52+
if err := json.Unmarshal(bz, &data); err != nil {
5353
return err
5454
}
5555
return tx.UnmarshalBinary(data)
@@ -60,7 +60,7 @@ func (tx EthereumTx) MarshalJSON() ([]byte, error) {
6060
if err != nil {
6161
return nil, err
6262
}
63-
return json.Marshal(bz)
63+
return json.Marshal(hexutil.Bytes(bz))
6464
}
6565

6666
func (tx EthereumTx) Validate() error {

0 commit comments

Comments
 (0)