Skip to content

Commit 5a81d08

Browse files
committed
Apply Formatting
1 parent 3dc9936 commit 5a81d08

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/BotPlutusInterface/Balance.hs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import Cardano.Api.Shelley (ProtocolParameters (protocolParamPrices))
3636
import Control.Monad (foldM, void, zipWithM)
3737
import Control.Monad.Freer (Eff, Member)
3838
import 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)
4040
import Control.Monad.Trans.Except (throwE)
4141
import Data.Bifunctor (bimap)
4242
import Data.Coerce (coerce)
@@ -69,7 +69,7 @@ import Ledger.Tx (
6969
TxOutRef (..),
7070
)
7171
import Ledger.Tx qualified as Tx
72-
import Ledger.Tx.CardanoAPI (ToCardanoError(InvalidValidityRange))
72+
import Ledger.Tx.CardanoAPI (ToCardanoError (InvalidValidityRange))
7373
import Ledger.Value (Value)
7474
import Ledger.Value qualified as Value
7575
import 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

src/BotPlutusInterface/Contract.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ handleCollateral cEnv = do
474474
helperLog
475475
("Failed to create collateral UTxO: " <> pretty notCreatedCollateral)
476476

477-
pure notCreatedCollateral
477+
pure notCreatedCollateral
478478

479479
case result of
480480
Right collteralUtxo ->

0 commit comments

Comments
 (0)