Skip to content

Commit

Permalink
chore: simplify with <|>
Browse files Browse the repository at this point in the history
  • Loading branch information
penandlim committed Feb 28, 2024
1 parent 9b26749 commit 38ebde2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ versionOption = infoOption

overrideConfig :: EConfig -> Options -> IO EConfig
overrideConfig config Options{..} = do
rpcUrl <- maybe (Onchain.rpcUrlEnv) (pure . Just) cliRpcUrl
rpcBlock <- maybe (Onchain.rpcBlockEnv) (pure . Just) cliRpcBlock
rpcUrl <- (pure cliRpcUrl) <|> Onchain.rpcUrlEnv
rpcBlock <- (pure cliRpcBlock) <|> Onchain.rpcBlockEnv
pure $
config { solConf = overrideSolConf config.solConf
, campaignConf = overrideCampaignConf config.campaignConf
Expand Down

0 comments on commit 38ebde2

Please sign in to comment.