Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
fix tx attr to json
Browse files Browse the repository at this point in the history
  • Loading branch information
localhuman committed Oct 21, 2017
1 parent 7a2dd77 commit 7d4fe43
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions neo/Core/TX/TransactionAttribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7d4fe43

Please sign in to comment.