Skip to content

Commit

Permalink
Fix Cardano.Api.Query type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer authored and disassembler committed Jul 7, 2023
1 parent 7198fcb commit 8b8c9fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cardano-api/internal/Cardano/Api/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ import Cardano.Api.Value

import qualified Cardano.Chain.Update.Validation.Interface as Byron.Update
import Cardano.Ledger.Binary
import Cardano.Ledger.SafeHash (SafeHash)
import Data.ByteString (ByteString)
import Cardano.Ledger.Core (EraCrypto)
import qualified Cardano.Ledger.Binary.Plain as Plain
import Cardano.Ledger.Core (EraCrypto)
import qualified Cardano.Ledger.Credential as Shelley
import Cardano.Ledger.Crypto (Crypto)
import Cardano.Ledger.SafeHash (SafeHash)
import qualified Cardano.Ledger.Shelley.API as Shelley
import qualified Cardano.Ledger.Shelley.Core as Core
import qualified Cardano.Ledger.Shelley.LedgerState as Shelley
Expand Down Expand Up @@ -131,6 +130,7 @@ import qualified Data.Aeson as Aeson
import qualified Data.Aeson.KeyMap as KeyMap
import Data.Aeson.Types (Parser)
import Data.Bifunctor (bimap, first)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as LBS
import Data.Either.Combinators (rightToMaybe)
import qualified Data.HashMap.Strict as HMS
Expand Down Expand Up @@ -298,7 +298,7 @@ data QueryInShelleyBasedEra era result where
-> QueryInShelleyBasedEra era (Map StakeCredential Lovelace)

QueryConstitutionHash
:: QueryInShelleyBasedEra era (Maybe (SafeHash (EraCrypto era) ByteString))
:: QueryInShelleyBasedEra era (Maybe (SafeHash (EraCrypto (ShelleyLedgerEra era)) ByteString))


instance NodeToClientVersionOf (QueryInShelleyBasedEra era result) where
Expand Down
2 changes: 1 addition & 1 deletion cardano-api/internal/Cardano/Api/Query/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ queryProtocolParameters eraInMode sbe =
queryConstitutionHash :: ()
=> EraInMode era mode
-> ShelleyBasedEra era
-> LocalStateQueryExpr block point (QueryInMode mode) r IO (Either UnsupportedNtcVersionError (Either EraMismatch (Maybe (SafeHash (EraCrypto era) ByteString))))
-> LocalStateQueryExpr block point (QueryInMode mode) r IO (Either UnsupportedNtcVersionError (Either EraMismatch (Maybe (SafeHash (EraCrypto (ShelleyLedgerEra era)) ByteString))))
queryConstitutionHash eraInMode sbe =
queryExpr $ QueryInEra eraInMode $ QueryInShelleyBasedEra sbe QueryConstitutionHash

Expand Down

0 comments on commit 8b8c9fd

Please sign in to comment.