From 7d4fe43e9fb36d077f54ea6081acd056f03a7046 Mon Sep 17 00:00:00 2001 From: Thomas Saunders Date: Sat, 21 Oct 2017 10:59:19 -0500 Subject: [PATCH] fix tx attr to json --- neo/Core/TX/TransactionAttribute.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/neo/Core/TX/TransactionAttribute.py b/neo/Core/TX/TransactionAttribute.py index 77877f30f..c222074ed 100644 --- a/neo/Core/TX/TransactionAttribute.py +++ b/neo/Core/TX/TransactionAttribute.py @@ -126,18 +126,10 @@ def Serialize(self, writer): def ToJson(self): - outstr = self.Data - - try: - outstr = binascii.unhexlify(self.Data) - except Exception as e: - - print("couldnt decode data %s " % self.Data) - outstr = self.Data.decode('utf-8') obj = { 'usage': self.Usage, - 'data': outstr + 'data': '' if not self.Data else self.Data.hex() } return obj \ No newline at end of file