Skip to content

Commit 127f9d7

Browse files
committed
Update data type
1 parent 0130118 commit 127f9d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/handler/tx.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type TxResponse struct {
2020
Height int64 `json:"height,omitempty"`
2121
TxHash string `json:"txhash,omitempty"`
2222
Code uint32 `json:"code,omitempty"`
23-
Data string `json:"data,omitempty"`
23+
Data []byte `json:"data,omitempty"`
2424
RawLog string `json:"raw_log,omitempty"`
2525
GasWanted int64 `json:"gas_wanted,omitempty"`
2626
GasUsed int64 `json:"gas_used,omitempty"`
@@ -61,7 +61,7 @@ func TxsHandler(cli client.ABCIClient) http.HandlerFunc {
6161
TxHash: fmt.Sprintf("%X", res.Hash),
6262
Height: res.Height,
6363
Code: code,
64-
Data: string(res.DeliverTx.Data),
64+
Data: res.DeliverTx.Data,
6565
RawLog: log,
6666
GasWanted: res.DeliverTx.GasWanted,
6767
GasUsed: res.DeliverTx.GasUsed,
@@ -104,7 +104,7 @@ func ProtoTxsHandler(cli client.ABCIClient) http.HandlerFunc {
104104
TxHash: fmt.Sprintf("%X", res.Hash),
105105
Height: res.Height,
106106
Code: code,
107-
Data: string(res.DeliverTx.Data),
107+
Data: res.DeliverTx.Data,
108108
RawLog: log,
109109
GasWanted: res.DeliverTx.GasWanted,
110110
GasUsed: res.DeliverTx.GasUsed,

0 commit comments

Comments
 (0)