Skip to content

Commit

Permalink
fixup! Add MintBurn indexer
Browse files Browse the repository at this point in the history
Inline getMaryOtherAssets helper -- it was used only once.
  • Loading branch information
eyeinsky committed Feb 8, 2023
1 parent 6df16b8 commit d6f677a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions marconi/src/Marconi/Index/MintBurn.hs
Expand Up @@ -112,13 +112,10 @@ mintRedeemers txb = txRedeemers txb
& filter (\(LA.RdmrPtr tag _, _) -> tag == LA.Mint)
& map (\(LA.RdmrPtr _ w, a) -> (w, a))

getMaryOtherAssets :: LM.Value c -> Map.Map (LM.PolicyID c) (Map.Map LM.AssetName Integer)
getMaryOtherAssets (LM.Value _ m) = m

getPolicyData :: C.TxBody era -> LM.Value OEra.StandardCrypto -> [(C.PolicyId, C.AssetName, C.Quantity, Word64, C.ScriptData)]
getPolicyData txb value = do
getPolicyData txb (LM.Value _ m) = do
let
policyIdList = Map.toList $ getMaryOtherAssets value
policyIdList = Map.toList m
getPolicyId index' = policyIdList !! fromIntegral index'
((maryPolicyID, assets), index'', (redeemer, _)) <- map (\(index', data_) -> (getPolicyId index', index', data_)) $ mintRedeemers txb
(assetName, quantity) :: (LM.AssetName, Integer) <- Map.toList assets
Expand Down

0 comments on commit d6f677a

Please sign in to comment.