@@ -19,7 +19,6 @@ import Hydra.Cardano.Api (
19
19
AssetId (.. ),
20
20
AssetName (AssetName ),
21
21
ChainPoint (.. ),
22
- Coin ,
23
22
CtxUTxO ,
24
23
Key (SigningKey , VerificationKey , verificationKeyHash ),
25
24
NetworkId (Mainnet , Testnet ),
@@ -329,11 +328,10 @@ commit ::
329
328
UTxO ->
330
329
-- | 'UTxO' to commit. All outputs are assumed to be owned by public keys
331
330
UTxO ->
332
- Maybe Coin ->
333
331
Either (PostTxError Tx ) Tx
334
- commit ctx headId spendableUTxO lookupUTxO amount =
332
+ commit ctx headId spendableUTxO lookupUTxO =
335
333
let blueprintTx = txSpendingUTxO lookupUTxO
336
- in commit' ctx headId spendableUTxO CommitBlueprintTx {lookupUTxO, blueprintTx} amount
334
+ in commit' ctx headId spendableUTxO CommitBlueprintTx {lookupUTxO, blueprintTx}
337
335
338
336
-- | Construct a commit transaction based on known, spendable UTxO and some
339
337
-- user UTxO inputs to commit. This does look for "our initial output" to spend
@@ -347,14 +345,13 @@ commit' ::
347
345
-- | Spendable 'UTxO'
348
346
UTxO ->
349
347
CommitBlueprintTx Tx ->
350
- Maybe Coin ->
351
348
Either (PostTxError Tx ) Tx
352
- commit' ctx headId spendableUTxO commitBlueprintTx amount = do
349
+ commit' ctx headId spendableUTxO commitBlueprintTx = do
353
350
pid <- headIdToPolicyId headId ?> InvalidHeadId {headId}
354
351
(i, o) <- ownInitial pid ?> CannotFindOwnInitial {knownUTxO = spendableUTxO}
355
352
rejectByronAddress lookupUTxO
356
353
rejectMoreThanMainnetLimit networkId lookupUTxO
357
- pure $ commitTx networkId scriptRegistry headId ownParty commitBlueprintTx (i, o, vkh) amount
354
+ pure $ commitTx networkId scriptRegistry headId ownParty commitBlueprintTx (i, o, vkh)
358
355
where
359
356
CommitBlueprintTx {lookupUTxO} = commitBlueprintTx
360
357
@@ -940,7 +937,7 @@ genChainStateWithTx =
940
937
(cctx, stInitial) <- genStInitial ctx
941
938
utxo <- genCommit
942
939
let InitialState {headId} = stInitial
943
- let tx = unsafeCommit cctx headId (getKnownUTxO stInitial) utxo Nothing
940
+ let tx = unsafeCommit cctx headId (getKnownUTxO stInitial) utxo
944
941
pure (cctx, Initial stInitial, mempty , tx, Commit )
945
942
946
943
genCollectWithState :: Gen (ChainContext , ChainState , UTxO , Tx , ChainTransition )
@@ -1101,7 +1098,7 @@ genCommits' genUTxO ctx txInit = do
1101
1098
allChainContexts <- deriveChainContexts ctx
1102
1099
forM (zip allChainContexts scaledCommitUTxOs) $ \ (cctx, toCommit) -> do
1103
1100
let stInitial@ InitialState {headId} = unsafeObserveInit cctx (ctxVerificationKeys ctx) txInit
1104
- pure $ unsafeCommit cctx headId (getKnownUTxO stInitial) toCommit Nothing
1101
+ pure $ unsafeCommit cctx headId (getKnownUTxO stInitial) toCommit
1105
1102
where
1106
1103
scaleCommitUTxOs :: [UTxO ] -> [UTxO ]
1107
1104
scaleCommitUTxOs commitUTxOs =
@@ -1320,10 +1317,9 @@ unsafeCommit ::
1320
1317
UTxO ->
1321
1318
-- | 'UTxO' to commit. All outputs are assumed to be owned by public keys.
1322
1319
UTxO ->
1323
- Maybe Coin ->
1324
1320
Tx
1325
- unsafeCommit ctx headId spendableUTxO utxoToCommit amount =
1326
- either (error . show ) id $ commit ctx headId spendableUTxO utxoToCommit amount
1321
+ unsafeCommit ctx headId spendableUTxO utxoToCommit =
1322
+ either (error . show ) id $ commit ctx headId spendableUTxO utxoToCommit
1327
1323
1328
1324
unsafeAbort ::
1329
1325
HasCallStack =>
0 commit comments