Skip to content

Commit cdcd34e

Browse files
committed
Register transaction to_json() function fix
1 parent 36e29d8 commit cdcd34e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lto/transactions/register.py

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

5656
@staticmethod
5757
def __account_to_json(account):
58-
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
58+
try:
59+
if account['key_type']:
60+
return {'keyType': account['key_type'], 'publicKey': account['public_key']}
61+
except:
62+
return account
5963

6064
def to_json(self):
6165
return (crypto.merge_dicts({

0 commit comments

Comments
 (0)