Skip to content

Commit

Permalink
Remove anythingFromSealedTx
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus committed Aug 8, 2024
1 parent 5d0b17a commit a75e45b
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,17 @@

module Cardano.Wallet.Primitive.Ledger.Read.Tx.Sealed
( fromSealedTx
, anythingFromSealedTx
) where

import Prelude

import Cardano.Api
( InAnyCardanoEra (..)
)
import Cardano.Wallet.Primitive.Types.Tx.SealedTx
( SealedTx (unsafeCardanoTx)
)
import Cardano.Wallet.Read
( Era (..)
, EraValue (..)
( EraValue (..)
, Tx (..)
, applyEraFun
)
import Cardano.Wallet.Read.Eras
( Allegra
Expand All @@ -43,9 +38,6 @@ fromSealedTx sealed =
case unsafeCardanoTx sealed of
InAnyCardanoEra _ce tx -> fromCardanoApiTx tx

anythingFromSealedTx :: (forall era . Tx era -> a) -> SealedTx -> a
anythingFromSealedTx f = applyEraFun f . fromSealedTx

fromCardanoApiTx :: Cardano.Tx era -> EraValue Tx
fromCardanoApiTx tx0 = case tx0 of
Cardano.ShelleyTx era tx -> case era of
Expand Down

0 comments on commit a75e45b

Please sign in to comment.