Skip to content

fix: Fixes the instances for InternalOperationContents

Ben Kolera requested to merge blk@fix_manager_op_internal_contents into develop

Prior to this, the template haskell generated instances for InternalOperationContents{Delegation,Origination,Reveal} were actually trying to decode/encode an array. Weird behaviour of the no arg single constructor datatype? This defines the instances by hand for now.

Before:

*Data.LCA.Online.Polymorphic Data.Aeson Tezos.V005.Operation> eitherDecode @InternalOperationContentsDelegation "{}"
Left "Error in $: When parsing the constructor InternalOperationContentsDelegation of type Tezos.V005.Operation.InternalOperationContentsDelegation expected Array but got Object.

Now:

*Data.LCA.Online.Polymorphic Data.Aeson Tezos.V005.Operation> eitherDecode @InternalOperationContentsDelegation "{}"
Right InternalOperationContentsDelegation

@jonored

Merge request reports