Skip to content

Commit

Permalink
Move adjustedPartialTx to where clause and add type signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Apr 18, 2024
1 parent 3aadfa3 commit df19507
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -531,9 +531,7 @@ balanceTransaction
s
partialTx
= do
let adjustedPartialTx = flip (over #tx) partialTx $
assignMinimalAdaQuantitiesToOutputsWithoutAda pp
balanceWith strategy =
let balanceWith strategy =
balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment
pp
timeTranslation
Expand All @@ -549,6 +547,10 @@ balanceTransaction
then balanceWith SelectionStrategyMinimal
else throwE e
where
adjustedPartialTx :: PartialTx era
adjustedPartialTx = flip (over #tx) partialTx $
assignMinimalAdaQuantitiesToOutputsWithoutAda pp

-- Determines whether or not the minimal selection strategy is worth trying.
-- This depends upon the way in which the optimal selection strategy failed.
minimalStrategyIsWorthTrying :: ErrBalanceTx era -> Bool
Expand Down

0 comments on commit df19507

Please sign in to comment.