Skip to content

Commit

Permalink
Merge pull request #69 from ltonetwork/fix-for-register-transaction
Browse files Browse the repository at this point in the history
Register transaction to_json() function fix
  • Loading branch information
AndreaScorza authored Apr 4, 2022
2 parents 33e1fdf + fab5ae1 commit f66e6db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lto/transactions/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def to_binary(self):

@staticmethod
def __account_to_json(account):
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
if 'key_type' in account:
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
return account

def to_json(self):
return (crypto.merge_dicts({
Expand Down

0 comments on commit f66e6db

Please sign in to comment.