Erased authority after passing incorrect JSON
While writing tests for account_update2
operation I encountered interesting behavior. By mistake I passed to wallet incorrect JSON:
{'ref_block_num': 0, 'ref_block_prefix': 0, 'expiration': '1970-01-01T00:00:00', 'operations': [['account_update2', {'account': 'alice', 'owner': {'owner': {'account_auths': [], 'key_auths': [['TST4yYzyVQNMXT9YSjbqn9aPL8qdWVYT81yqJmsKWSrpWKJ9j1riS', 1]], 'weight_threshold': 1}}}]], 'extensions': [], 'signatures': [], 'transaction_id': '0000000000000000000000000000000000000000', 'block_num': 0, 'transaction_num': 0}
Second occurence of 'owner':
is wrong, it shouldn't be there, however I passed this transaction to wallet and it was broadcasted without any errors. In result owner
authority of this account was totally erased. There was no keys in key_auths
and weight_threshold
was set to 0. Worked same way with account_update
operation.
Edited by Mateusz Kudela