RIght now AnyTxType is serialized as number but we should use quantity for it.
Also, MaybeTaggedEnvelope would correctly deserialize legacy transaction if map has all its fields and a different type flag. This is the case for deposit transaction breaking its deserialization in AnyTxEnvelope context
Solution
Serialize and deserialize AnyTxType as U8
Fail Untagged variant deserialization if type is present.
Also fixed deserialization of transaction fields in Transaction trait impl. We had incorrect name for gas and didn't use quantity when deserializing integers.
Motivation
RIght now
AnyTxType
is serialized as number but we should use quantity for it.Also,
MaybeTaggedEnvelope
would correctly deserialize legacy transaction if map has all its fields and a different type flag. This is the case for deposit transaction breaking its deserialization inAnyTxEnvelope
contextSolution
Serialize and deserialize
AnyTxType
asU8
Fail
Untagged
variant deserialization iftype
is present.Also fixed deserialization of transaction fields in
Transaction
trait impl. We had incorrect name forgas
and didn't use quantity when deserializing integers.PR Checklist