File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ instance ReadConfig IO where
121121mkEnv :: EConfig -> BuildOutput -> [EchidnaTest ] -> World -> Maybe SlitherInfo -> IO Env
122122mkEnv cfg buildOutput tests world slitherInfo = do
123123 codehashMap <- newIORef mempty
124- chainId <- maybe ( pure Nothing ) Onchain. fetchChainIdFrom ( Just cfg. rpcUrl)
124+ chainId <- Onchain. fetchChainIdFrom cfg. rpcUrl
125125 eventQueue <- newChan
126126 coverageRefInit <- newIORef mempty
127127 coverageRefRuntime <- newIORef mempty
Original file line number Diff line number Diff line change 22
33module Main where
44
5- import Control.Monad (unless , forM_ )
5+ import Control.Monad (unless , when , forM_ )
66import Control.Monad.Random (getRandomR )
77import Control.Monad.Reader (runReaderT , liftIO )
88import Data.Aeson.Key qualified as Aeson.Key
@@ -12,7 +12,7 @@ import Data.Hashable (hash)
1212import Data.IORef (readIORef )
1313import Data.List.NonEmpty qualified as NE
1414import Data.Map qualified as Map
15- import Data.Maybe (fromMaybe )
15+ import Data.Maybe (fromMaybe , isJust )
1616import Data.Set qualified as Set
1717import Data.Text (Text )
1818import Data.Text qualified as T
@@ -116,7 +116,7 @@ main = withUtf8 $ withCP65001 $ do
116116 -- as it orders the runs chronologically.
117117 runId <- fromIntegral . systemSeconds <$> getSystemTime
118118
119- Onchain. saveCoverageReport env runId
119+ when (isJust env . cfg . rpcUrl) $ Onchain. saveCoverageReport env runId
120120
121121 -- save source coverage reports
122122 let contracts = Map. elems env. dapp. solcByName
You can’t perform that action at this time.
0 commit comments