Skip to content

Commit

Permalink
Fix using queryStakeVoteDelegatees in eras before conway
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Nov 27, 2023
1 parent c50683f commit 1be41eb
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 1be41eb

Please sign in to comment.