Skip to content

Commit 8255c21

Browse files
committed
FailedToConstructDepositTx error now yields 400 errors
1 parent c380308 commit 8255c21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hydra-tx/src/Hydra/Tx/Deposit.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pickTokensToDeposit leftoverUTxO depositTokens
9999
| Map.null depositTokens = mempty
100100
| otherwise = UTxO.fromList picked
101101
where
102-
-- Build list of (TxIn, new TxOut) where new TxOut has original lovelace + exact required quantities of matched assets.
102+
-- Build list of (TxIn, new TxOut) where new TxOut has exact required quantities of matched assets.
103103
picked :: [(TxIn, TxOut CtxUTxO)]
104104
picked =
105105
[ (i, mkTxOutValueNotKeepingLovelace o newValue)
@@ -126,7 +126,7 @@ pickTokensToDeposit leftoverUTxO depositTokens
126126
Just availQty | reqQty <= availQty -> Map.insert name reqQty matched
127127
_ -> matched
128128

129-
-- Helper to create TxOut with original lovelace + new value (unchanged from original).
129+
-- Helper to create TxOut with new value (unchanged from original) and removing all lovelace.
130130
mkTxOutValueNotKeepingLovelace :: TxOut ctx -> Value -> TxOut ctx
131131
mkTxOutValueNotKeepingLovelace (TxOut addr _ datum refScript) newValue =
132132
TxOut addr newValue datum refScript

0 commit comments

Comments
 (0)