update subscription converts to support the newly optional operation metadata balance_update field
Previously the operation metadata fields from the RPC that provided a balance_update
as an array, and if there was no data available, it would return an empty array.
In the Jakartanet protocol upgrade, it seems that the balance_update
may not always be present. This caused some of the converters to fail.
The affected operation kinds are:
- transactions
- endorsements
- preendorsements
Here are some examples of operations without balance_update
arrays that caused failures.
Transaction Example from RPC
kind: 'transaction',
source: 'tz1WGZ8Z3khZycXPQJyUfVgpQYA9rwwispzV',
fee: '0',
counter: '24289454',
gas_limit: '2501',
storage_limit: '350',
amount: '0',
destination: 'KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC',
parameters: { entrypoint: 'retract_ask', value: { int: '1722122' } },
metadata: {
operation_result: {
status: 'applied',
storage: [Object],
consumed_gas: '2401',
consumed_milligas: '2400768',
storage_size: '60012237',
lazy_storage_diff: [Array]
}
}
}
Transaction Example of the same operation above from TZKT: https://tzkt.io/opWpQuJQ4psnc23TXuw1aN6ekbKpG1oybDK6KyrtgesXd8hAA8Q
Endorsement Example before Jakartanet Upgrade: https://tzkt.io/op4hqu8xiYxsVdBEGy6eCBkS2gLrYWbn9zjQqjGiWHncnKthBCy
Endorsement Example after Jakartanet Upgrade: https://tzkt.io/onmbaV7wN2cQ3pcjw3SK7iRvc5NsUHCGoRWpTV6jkuY5fmZ9jRg