Skip to content

Commit

Permalink
[TRON]: Skip empty memo JSON serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshiotomakan committed Nov 5, 2024
1 parent 5fa028f commit 5e9097c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Tron/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e9097c

Please sign in to comment.