Skip to content

Commit f28432e

Browse files
teodanciulehins
authored andcommitted
Disallow missing fields in JSON deserialization of ShelleyPParams
1 parent 9d2baa6 commit f28432e

File tree

1 file changed

+2
-4
lines changed
  • eras/shelley/impl/src/Cardano/Ledger/Shelley

1 file changed

+2
-4
lines changed

eras/shelley/impl/src/Cardano/Ledger/Shelley/PParams.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ import Data.Aeson (
7979
ToJSON (..),
8080
object,
8181
pairs,
82-
(.!=),
8382
(.:),
84-
(.:?),
8583
(.=),
8684
)
8785
import qualified Data.Aeson as Aeson
@@ -284,8 +282,8 @@ instance FromJSON (ShelleyPParams Identity era) where
284282
<*> obj .: "decentralization"
285283
<*> obj .: "extraPraosEntropy"
286284
<*> obj .: "protocolVersion"
287-
<*> obj .:? "minUTxOValue" .!= mempty
288-
<*> obj .:? "minPoolCost" .!= mempty
285+
<*> obj .: "minUTxOValue"
286+
<*> obj .: "minPoolCost"
289287

290288
emptyShelleyPParams :: forall era. Era era => ShelleyPParams Identity era
291289
emptyShelleyPParams =

0 commit comments

Comments
 (0)