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 2
2
3
3
## 1.18.0.0
4
4
5
+ * Remove ` delegators ` field from JSON serialiser for ` DRepState ` for correct round-tripping. #5004
5
6
* Change ` TxBody ` to an associated ` data ` family
6
7
* Remove ` HeapWords ` instances for: #5001
7
8
- ` Coin `
Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ instance ToJSON DRepState where
186
186
object $
187
187
[ " expiry" .= toJSON drepExpiry
188
188
, " 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.
190
191
]
191
192
++ [" anchor" .= toJSON anchor | SJust anchor <- [drepAnchor]]
192
193
@@ -196,7 +197,7 @@ instance FromJSON DRepState where
196
197
<$> o .: " expiry"
197
198
<*> o .:? " anchor" .!= SNothing
198
199
<*> o .: " deposit"
199
- -- Construction of DRep state with deleagations is intentionally prohibited, since
200
+ -- Construction of DRep state with delegations is intentionally prohibited, since
200
201
-- there is a requirement to retain the invariant of delegations in the UMap
201
202
<*> pure mempty
202
203
You can’t perform that action at this time.
0 commit comments