@@ -14,7 +14,6 @@ import Control.Monad (foldM, void, zipWithM)
1414import Control.Monad.Freer (Eff , Member )
1515import Control.Monad.Trans.Class (lift )
1616import Control.Monad.Trans.Either (EitherT , hoistEither , newEitherT , runEitherT )
17- import Data.Default (Default (def ))
1817import Data.Either.Combinators (maybeToRight , rightToMaybe )
1918import Data.Kind (Type )
2019import Data.List (partition , (\\) )
@@ -77,6 +76,7 @@ preBalanceTxIO pabConf ownPkh unbalancedTx =
7776 tx <-
7877 hoistEither $
7978 addValidRange
79+ pabConf
8080 (unBalancedTxValidityTimeRange unbalancedTx)
8181 (unBalancedTxTx unbalancedTx)
8282
@@ -272,10 +272,10 @@ addSignatories ownPkh privKeys pkhs tx =
272272 tx
273273 (ownPkh : pkhs)
274274
275- addValidRange :: POSIXTimeRange -> Tx -> Either Text Tx
276- addValidRange timeRange tx =
275+ addValidRange :: PABConfig -> POSIXTimeRange -> Tx -> Either Text Tx
276+ addValidRange pabConf timeRange tx =
277277 if validateRange timeRange
278- then Right $ tx {txValidRange = posixTimeRangeToContainedSlotRange def timeRange}
278+ then Right $ tx {txValidRange = posixTimeRangeToContainedSlotRange pabConf . pcSlotConfig timeRange}
279279 else Left " Invalid validity interval."
280280
281281validateRange :: forall (a :: Type ). Ord a => Interval a -> Bool
0 commit comments