Skip to content

Commit

Permalink
Make restrictResolution more concise.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Apr 22, 2024
1 parent 6840079 commit 081595c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/balance-tx/test/spec/Internal/Cardano/Write/Tx/BalanceSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2301,16 +2301,9 @@ paymentPartialTx txouts =
-- shrinking the CBOR.
--
-- NOTE: Perhaps ideally 'PartialTx' would handle this automatically.
restrictResolution
:: forall era. IsRecentEra era
=> PartialTx era
-> PartialTx era
restrictResolution partialTx@PartialTx {tx, extraUTxO} =
partialTx
{ extraUTxO
= UTxO
$ unUTxO extraUTxO `Map.restrictKeys` txIns
}
restrictResolution :: IsRecentEra era => PartialTx era -> PartialTx era
restrictResolution partialTx@PartialTx {tx, extraUTxO} = partialTx
{extraUTxO = UTxO $ unUTxO extraUTxO `Map.restrictKeys` txIns}
where
txIns = tx ^. bodyTxL . inputsTxBodyL

Expand Down

0 comments on commit 081595c

Please sign in to comment.