Skip to content

Commit

Permalink
fix: ensure operating on Maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
penandlim committed Feb 29, 2024
1 parent 3381469 commit a562a06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ versionOption = infoOption

overrideConfig :: EConfig -> Options -> IO EConfig
overrideConfig config Options{..} = do
rpcUrl <- pure cliRpcUrl <|> Onchain.rpcUrlEnv
rpcBlock <- pure cliRpcBlock <|> Onchain.rpcBlockEnv
envRpcUrl <- Onchain.rpcUrlEnv
envRpcBlock <- Onchain.rpcBlockEnv
pure $
config { solConf = overrideSolConf config.solConf
, campaignConf = overrideCampaignConf config.campaignConf
, uiConf = overrideUiConf config.uiConf
, rpcUrl = rpcUrl <|> config.rpcUrl
, rpcBlock = rpcBlock <|> config.rpcBlock
, rpcUrl = cliRpcUrl <|> envRpcUrl <|> config.rpcUrl
, rpcBlock = cliRpcBlock <|> envRpcBlock <|> config.rpcBlock
}
& overrideFormat
where
Expand Down

0 comments on commit a562a06

Please sign in to comment.