Skip to content

Commit

Permalink
Remove unused function getPaymentScriptHash
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Dec 9, 2024
1 parent c6da03a commit 4879d16
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions hydra-cardano-api/src/Hydra/Cardano/Api/ScriptHash.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,10 @@ module Hydra.Cardano.Api.ScriptHash where

import Hydra.Cardano.Api.Prelude

import Cardano.Ledger.Credential qualified as Ledger
import Hydra.Cardano.Api.PlutusScript ()

-- * Extras

-- | Extract the payment part of an address, as a script hash.
getPaymentScriptHash :: AddressInEra era -> Maybe ScriptHash
getPaymentScriptHash = \case
AddressInEra _ (ShelleyAddress _ (Ledger.ScriptHashObj h) _) ->
Just (fromShelleyScriptHash h)
_ ->
Nothing

-- | Like 'hashScript', but for a 'ScriptInAnyLang'.
hashScriptInAnyLang :: ScriptInAnyLang -> ScriptHash
hashScriptInAnyLang (ScriptInAnyLang _ script) =
Expand Down

0 comments on commit 4879d16

Please sign in to comment.