File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,9 @@ writeBalancedTx contractEnv (Right tx) = do
274274 , " Signatories (pkh): " <> Text. unwords (map pkhToText requiredSigners)
275275 ]
276276
277+ when (pabConf. pcCollectStats && signable) $
278+ collectBudgetStats (Tx. txId tx) pabConf
279+
277280 when (not pabConf. pcDryRun && signable) $ do
278281 newEitherT $ CardanoCLI. submitTx @ w pabConf tx
279282
@@ -284,9 +287,6 @@ writeBalancedTx contractEnv (Right tx) = do
284287 mvFiles (Files. txFilePath pabConf " raw" (Tx. txId tx)) (Files. txFilePath pabConf " raw" cardanoTxId)
285288 when signable $ mvFiles signedSrcPath signedDstPath
286289
287- when contractEnv. cePABConfig. pcCollectStats $
288- collectBudgetStats cardanoTxId signedDstPath
289-
290290 pure cardanoTx
291291 where
292292 mvFiles :: Text -> Text -> EitherT Text (Eff effs ) ()
@@ -299,8 +299,8 @@ writeBalancedTx contractEnv (Right tx) = do
299299 , cmdOutParser = const ()
300300 }
301301
302- collectBudgetStats txId txPath = do
303- let path = Text. unpack txPath
302+ collectBudgetStats txId pabConf = do
303+ let path = Text. unpack ( Files. txFilePath pabConf " signed " ( Tx. txId tx))
304304 b <- firstEitherT (Text. pack . show ) $ newEitherT $ estimateBudget @ w (Signed path)
305305 void $ newEitherT (Right <$> saveBudget @ w txId b)
306306
You can’t perform that action at this time.
0 commit comments