Skip to content

Commit c4cb830

Browse files
committed
Use Maybe instead of StrictMaybe in pInvalidHereafter
1 parent 3315832 commit c4cb830

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

cardano-cli/src/Cardano/CLI/EraBased/Common/Option.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,14 +2263,14 @@ pInvalidHereafter
22632263
pInvalidHereafter eon =
22642264
fmap (TxValidityUpperBound $ convert eon) $
22652265
asum
2266-
[ fmap (L.SJust . SlotNo) $
2266+
[ fmap (Just . SlotNo) $
22672267
Opt.option (bounded "SLOT") $
22682268
mconcat
22692269
[ Opt.long "invalid-hereafter"
22702270
, Opt.metavar "SLOT"
22712271
, Opt.help "Time that transaction is valid until (in slots)."
22722272
]
2273-
, fmap (L.SJust . SlotNo) $
2273+
, fmap (Just . SlotNo) $
22742274
Opt.option (bounded "SLOT") $
22752275
mconcat
22762276
[ Opt.long "upper-bound"
@@ -2282,15 +2282,15 @@ pInvalidHereafter eon =
22822282
]
22832283
, Opt.internal
22842284
]
2285-
, fmap (L.SJust . SlotNo) $
2285+
, fmap (Just . SlotNo) $
22862286
Opt.option (bounded "SLOT") $
22872287
mconcat
22882288
[ Opt.long "ttl"
22892289
, Opt.metavar "SLOT"
22902290
, Opt.help "Time to live (in slots) (deprecated; use --invalid-hereafter instead)."
22912291
, Opt.internal
22922292
]
2293-
, pure L.SNothing
2293+
, pure Nothing
22942294
]
22952295

22962296
pTxFee :: Parser Lovelace

cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ import Data.Data ((:~:) (..))
8787
import Data.Foldable qualified as Foldable
8888
import Data.List qualified as List
8989
import Data.Map.Strict qualified as Map
90-
import Data.Maybe.Strict (strictMaybe)
9190
import Data.Set qualified as Set
9291
import Data.Text qualified as Text
9392
import Data.Text.IO qualified as Text
@@ -926,7 +925,7 @@ constructTxBodyContent
926925
& maybe id Exp.setTxTotalCollateral txTotCollateral
927926
& Exp.setTxFee fee
928927
& maybe id Exp.setTxValidityLowerBound mLowerBound
929-
& strictMaybe id Exp.setTxValidityUpperBound mUpperBound
928+
& maybe id Exp.setTxValidityUpperBound mUpperBound
930929
& Exp.setTxMetadata expTxMetadata
931930
& Exp.setTxAuxScripts auxScripts
932931
& Exp.setTxWithdrawals validatedWithdrawals

0 commit comments

Comments
 (0)