File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 22
33## 1.18.0.0
44
5+ * Remove ` delegators ` field from JSON serialiser for ` DRepState ` for correct round-tripping. #5004
56* Change ` TxBody ` to an associated ` data ` family
67* Remove ` HeapWords ` instances for: #5001
78 - ` Coin `
Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ instance ToJSON DRepState where
186186 object $
187187 [ " expiry" .= toJSON drepExpiry
188188 , " deposit" .= toJSON drepDeposit
189- , " delegators" .= toJSON drepDelegs
189+ -- Since the corresponding `FromJSON` instance ignores the `delegators` field,
190+ -- we omit it from the `ToJSON` instance, ensuring that round-tripping behaves as expected.
190191 ]
191192 ++ [" anchor" .= toJSON anchor | SJust anchor <- [drepAnchor]]
192193
@@ -196,7 +197,7 @@ instance FromJSON DRepState where
196197 <$> o .: " expiry"
197198 <*> o .:? " anchor" .!= SNothing
198199 <*> o .: " deposit"
199- -- Construction of DRep state with deleagations is intentionally prohibited, since
200+ -- Construction of DRep state with delegations is intentionally prohibited, since
200201 -- there is a requirement to retain the invariant of delegations in the UMap
201202 <*> pure mempty
202203
You can’t perform that action at this time.
0 commit comments