An action (like eosio.msig::approve) containing an optional field (like proposal_hash) when decoded will return a null value as the value. This field should be omitted entirely.
Example action data for eosio.msig::approve
{
proposer: 'foo',
proposal_name: 'bar',
level: {
actor: 'baz',
permission: 'active',
},
}
Encoding this action will result in a proper encoded hex value - but when decoding the action again, it will result in a different action structure:
{
proposer: 'foo',
proposal_name: 'bar',
level: {
actor: 'baz',
permission: 'active',
},
proposal_hash: null
}
This causes problems with the wharfkit/wallet-plugin-cleos representation of the transaction, since when you submit the above action as a cleos command, cleos will reject it with null being an invalid value.
The serializer in this instance, when decoding an action, will need to omit proposal_hash from the JSON-like representation of the action, instead of including it and setting it to a null value.
At this point I am unsure if omitting the field during decoding will break anything else, so some research is going to be required to determine the best course of action here.
An action (like
eosio.msig::approve) containing an optional field (likeproposal_hash) when decoded will return a null value as the value. This field should be omitted entirely.Example action data for
eosio.msig::approveEncoding this action will result in a proper encoded hex value - but when decoding the action again, it will result in a different action structure:
This causes problems with the wharfkit/wallet-plugin-cleos representation of the transaction, since when you submit the above action as a cleos command, cleos will reject it with
nullbeing an invalid value.The serializer in this instance, when decoding an action, will need to omit
proposal_hashfrom the JSON-like representation of the action, instead of including it and setting it to anullvalue.At this point I am unsure if omitting the field during decoding will break anything else, so some research is going to be required to determine the best course of action here.