Skip to content

Commit

Permalink
Merge #3438
Browse files Browse the repository at this point in the history
3438: [cardano-api] Add a FromJSONKey instance for TxIn r=Jimbo4350 a=ch1bo

Replaces #3385

Co-authored-by: Sebastian Nagel <sebastian.nagel@ncoding.at>
  • Loading branch information
iohk-bors[bot] and ch1bo authored Dec 14, 2021
2 parents 7677553 + e747a76 commit e31455e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cardano-api/src/Cardano/Api/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ instance ToJSONKey TxIn where
toJSONKey = toJSONKeyText renderTxIn

instance FromJSON TxIn where
parseJSON = withText "TxIn" $ \txinStr -> runParsecParser parseTxIn txinStr
parseJSON = withText "TxIn" $ runParsecParser parseTxIn

instance FromJSONKey TxIn where
fromJSONKey = Aeson.FromJSONKeyTextParser $ runParsecParser parseTxIn

parseTxId :: Parsec.Parser TxId
parseTxId = do
Expand Down

0 comments on commit e31455e

Please sign in to comment.