diff --git a/src/Tron/Serialization.cpp b/src/Tron/Serialization.cpp index 41e82cb3a7c..989cac01ca2 100644 --- a/src/Tron/Serialization.cpp +++ b/src/Tron/Serialization.cpp @@ -291,7 +291,9 @@ json raw_dataJSON(const protocol::Transaction::raw& raw) { } raw_dataJSON["timestamp"] = raw.timestamp(); raw_dataJSON["expiration"] = raw.expiration(); - raw_dataJSON["data"] = hex(raw.data()); + if (!raw.data().empty()) { + raw_dataJSON["data"] = hex(raw.data()); + } raw_dataJSON["contract"] = json::array({contractJSON(raw.contract(0))}); return raw_dataJSON;