Skip to content

Commit

Permalink
Fix 4493 bug - essentially type field in the Shelley era text envelop…
Browse files Browse the repository at this point in the history
…e tx body was being written to disk as "TxWitnessShelley" and being read from disk as "TxWitness Shelley". I.e there was a mismatch and therefore it was not possible to read shelley era transaction bodies.
  • Loading branch information
Jimbo4350 committed Oct 4, 2022
1 parent 40458ee commit a4e23fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cardano-api/src/Cardano/Api/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ instance IsCardanoEra era => HasTextEnvelope (KeyWitness era) where
textEnvelopeType _ =
case cardanoEra :: CardanoEra era of
ByronEra -> "TxWitnessByron"
ShelleyEra -> "TxWitnessShelley"
ShelleyEra -> "TxWitness ShelleyEra"
AllegraEra -> "TxWitness AllegraEra"
MaryEra -> "TxWitness MaryEra"
AlonzoEra -> "TxWitness AlonzoEra"
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ acceptKeyWitnessCDDLSerialisation err =
firstExceptT (ShelleyTxCmdTextEnvCddlError tEnvErr)
$ newExceptT $ readFileTextEnvelopeCddlAnyOf teTypes fp

teTypes = [ FromCDDLWitness "TxWitness Shelley" CddlWitness
teTypes = [ FromCDDLWitness "TxWitness ShelleyEra" CddlWitness
, FromCDDLWitness "TxWitness AllegraEra" CddlWitness
, FromCDDLWitness "TxWitness MaryEra" CddlWitness
, FromCDDLWitness "TxWitness AlonzoEra" CddlWitness
Expand Down

0 comments on commit a4e23fd

Please sign in to comment.