Skip to content

Commit

Permalink
Merge pull request #483 from input-output-hk/mgalazyn/fix/use-querySt…
Browse files Browse the repository at this point in the history
…akeVoteDelegatees-only-in-conway-onwards

Fix using queryStakeVoteDelegatees in eras before conway
  • Loading branch information
carbolymer authored Nov 27, 2023
2 parents c50683f + 1be41eb commit 25604ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,10 @@ runQueryStakeAddressInfoCmd
& onLeft (left . QueryCmdUnsupportedNtcVersion)
& onLeft (left . QueryCmdLocalStateQueryError . EraMismatchError)

stakeVoteDelegatees <- lift (queryStakeVoteDelegatees sbe stakeAddr)
& onLeft (left . QueryCmdUnsupportedNtcVersion)
& onLeft (left . QueryCmdLocalStateQueryError . EraMismatchError)
stakeVoteDelegatees <- monoidForEraInEonA era $ \(_ :: ConwayEraOnwards era) ->
lift (queryStakeVoteDelegatees sbe stakeAddr)
& onLeft (left . QueryCmdUnsupportedNtcVersion)
& onLeft (left . QueryCmdLocalStateQueryError . EraMismatchError)

return $ do
writeStakeAddressInfo
Expand Down

0 comments on commit 25604ae

Please sign in to comment.