-
Notifications
You must be signed in to change notification settings - Fork 213
#1078 Use correct envelope type when decoding it #1081
Conversation
[ FromCDDLTx "Witnessed Tx AlonzoEra" CddlTx | ||
, FromCDDLTx "Unwitnessed Tx AlonzoEra" CddlTx | ||
, FromCDDLTx "Witnessed Tx BabbageEra" CddlTx | ||
, FromCDDLTx "Unwitnessed Tx BabbageEra" CddlTx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What other types can we expect here?
@@ -188,6 +188,9 @@ seqToList :: Seq.StrictSeq a -> [a] | |||
seqToList (x Seq.:<| rest) = x : seqToList rest | |||
seqToList Seq.Empty = [] | |||
|
|||
newtype CddlTx = CddlTx { unCddlTx :: InAnyCardanoEra Tx } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why duplicate this type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has a single use case across our repos - to use it as a wrapper in FromCDDLTx
. It's not exported from here so it's not usable outside of this module. It seemed easier to just copy it rather than add it to cardano-api and expose it from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jimbo4350 Is it fine for you? If yes, I'll be happy to merge it.
This fixes #1078 by using different
TextEnvelopeType
when deserializing text envelope.Repro in
cardan-api
: IntersectMBO/cardano-api#29cc: @newhoggy @Jimbo4350
Pre-submit checklist: