@@ -36,7 +36,7 @@ import Cardano.Api.Shelley (ProtocolParameters (protocolParamPrices))
3636import Control.Monad (foldM , void , zipWithM )
3737import Control.Monad.Freer (Eff , Member )
3838import Control.Monad.Trans.Class (lift )
39- import Control.Monad.Trans.Either (EitherT , hoistEither , newEitherT , runEitherT , firstEitherT )
39+ import Control.Monad.Trans.Either (EitherT , firstEitherT , hoistEither , newEitherT , runEitherT )
4040import Control.Monad.Trans.Except (throwE )
4141import Data.Bifunctor (bimap )
4242import Data.Coerce (coerce )
@@ -69,7 +69,7 @@ import Ledger.Tx (
6969 TxOutRef (.. ),
7070 )
7171import Ledger.Tx qualified as Tx
72- import Ledger.Tx.CardanoAPI (ToCardanoError (InvalidValidityRange ))
72+ import Ledger.Tx.CardanoAPI (ToCardanoError (InvalidValidityRange ))
7373import Ledger.Value (Value )
7474import Ledger.Value qualified as Value
7575import Plutus.V1.Ledger.Api (
@@ -193,8 +193,9 @@ balanceTxIO' balanceCfg pabConf ownPkh unbalancedTx =
193193 balanceTxLoop utxoIndex privKeys prevMinUtxos tx = do
194194 void $ lift $ Files. writeAll @ w pabConf tx
195195 nextMinUtxos <-
196- firstEitherT WAPI. OtherError $ newEitherT $
197- calculateMinUtxos @ w pabConf (Tx. txData tx) $ Tx. txOutputs tx \\ map fst prevMinUtxos
196+ firstEitherT WAPI. OtherError $
197+ newEitherT $
198+ calculateMinUtxos @ w pabConf (Tx. txData tx) $ Tx. txOutputs tx \\ map fst prevMinUtxos
198199
199200 let minUtxos = prevMinUtxos ++ nextMinUtxos
200201
@@ -238,9 +239,10 @@ utxosAndCollateralAtAddress balanceCfg pabConf changeAddr =
238239 if bcHasScripts balanceCfg
239240 then
240241 maybe
241- ( throwE $ WAPI. OtherError $
242- " The given transaction uses script, but there's no collateral provided."
243- <> " This usually means that, we failed to create Tx and update our ContractEnvironment."
242+ ( throwE $
243+ WAPI. OtherError $
244+ " The given transaction uses script, but there's no collateral provided."
245+ <> " This usually means that, we failed to create Tx and update our ContractEnvironment."
244246 )
245247 (const $ pure (removeCollateralFromMap inMemCollateral utxos, inMemCollateral))
246248 inMemCollateral
@@ -437,7 +439,7 @@ addSignatories ownPkh privKeys pkhs tx =
437439 ( \ tx' pkh ->
438440 case Map. lookup pkh privKeys of
439441 Just privKey -> Right $ Tx. addSignature' (unDummyPrivateKey privKey) tx'
440- Nothing -> Left $ WAPI. PaymentPrivateKeyNotFound $ PaymentPubKeyHash pkh
442+ Nothing -> Left $ WAPI. PaymentPrivateKeyNotFound $ PaymentPubKeyHash pkh
441443 )
442444 tx
443445 (ownPkh : pkhs)
@@ -453,7 +455,7 @@ addValidRange timeRange tx =
453455 then
454456 bimap (WAPI. OtherError . Text. pack . show ) (setRange tx)
455457 <$> posixTimeRangeToContainedSlotRange @ w timeRange
456- else pure $ Left $ WAPI. ToCardanoError InvalidValidityRange
458+ else pure $ Left $ WAPI. ToCardanoError InvalidValidityRange
457459 where
458460 setRange tx' range = tx' {txValidRange = range}
459461
0 commit comments