Skip to content

Commit

Permalink
Merge pull request #221 from input-output-hk/mgalazyn/fix/error-when-…
Browse files Browse the repository at this point in the history
…running-drep-queries

Fix exception when executing drep queries
  • Loading branch information
carbolymer authored Aug 30, 2023
2 parents 5ff3fcd + d79b67f commit af36cae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cardano-api/internal/Cardano/Api/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -676,17 +676,16 @@ toConsensusQueryShelleyBased erainmode (QueryStakeDelegDeposits creds) =
creds' = Set.map toShelleyStakeCredential creds

toConsensusQueryShelleyBased erainmode QueryGovState =
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR Consensus.GetGovState))
Some (consensusQueryInEraInMode erainmode Consensus.GetGovState)

toConsensusQueryShelleyBased erainmode (QueryDRepState creds) =
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR (Consensus.GetDRepState creds)))

Some (consensusQueryInEraInMode erainmode (Consensus.GetDRepState creds))

toConsensusQueryShelleyBased erainmode (QueryDRepStakeDistr dreps) =
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR $ Consensus.GetDRepStakeDistr dreps))
Some (consensusQueryInEraInMode erainmode (Consensus.GetDRepStakeDistr dreps))

toConsensusQueryShelleyBased erainmode QueryCommitteeState =
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR Consensus.GetCommitteeState))
Some (consensusQueryInEraInMode erainmode Consensus.GetCommitteeState)

consensusQueryInEraInMode
:: forall era mode erablock modeblock result result' xs.
Expand Down Expand Up @@ -860,7 +859,7 @@ fromConsensusQueryResultShelleyBased _ QueryEpoch q' epoch =
fromConsensusQueryResultShelleyBased _ QueryConstitution q' mConstitution =
case q' of
Consensus.GetConstitution -> mConstitution
_ -> fromConsensusQueryResultMismatch
_ -> fromConsensusQueryResultMismatch

fromConsensusQueryResultShelleyBased _ QueryGenesisParameters q' r' =
case q' of
Expand Down

0 comments on commit af36cae

Please sign in to comment.