diff --git a/marconi-chain-index/src/Marconi/ChainIndex/Indexers/MintBurn.hs b/marconi-chain-index/src/Marconi/ChainIndex/Indexers/MintBurn.hs index b1d05f61ed..6326b7dd70 100644 --- a/marconi-chain-index/src/Marconi/ChainIndex/Indexers/MintBurn.hs +++ b/marconi-chain-index/src/Marconi/ChainIndex/Indexers/MintBurn.hs @@ -333,8 +333,9 @@ instance RI.Queryable MintBurnHandle where -- * Filter in-memory events upToSlot :: Maybe C.SlotNo -> [TxMintRow -> Bool] - upToSlot maybeSlotNo = - maybe [] (\slotNo -> [\row -> _txMintRowSlotNo row <= slotNo]) maybeSlotNo + upToSlot = \case + Just slotNo -> [\row -> _txMintRowSlotNo row <= slotNo] + Nothing -> [] matchesAssetId :: C.PolicyId -> C.AssetName -> TxMintRow -> Bool matchesAssetId policyId assetName row = @@ -374,7 +375,7 @@ instance RI.Queryable MintBurnHandle where ) mkUpperBoundCondition :: Maybe C.SlotNo -> ([SQL.Query], [NamedParam]) - mkUpperBoundCondition maybeUpperBound = case maybeUpperBound of + mkUpperBoundCondition = \case Nothing -> ([], []) Just s -> (["slotNo <= :slotNo"] , [":slotNo" := s])