Skip to content

Commit f66e6db

Browse files
authored
Merge pull request #69 from ltonetwork/fix-for-register-transaction
Register transaction to_json() function fix
2 parents 33e1fdf + fab5ae1 commit f66e6db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lto/transactions/register.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def to_binary(self):
5555

5656
@staticmethod
5757
def __account_to_json(account):
58-
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
58+
if 'key_type' in account:
59+
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
60+
return account
5961

6062
def to_json(self):
6163
return (crypto.merge_dicts({

0 commit comments

Comments
 (0)