Skip to content

Commit

Permalink
Merge pull request #487 from input-output-hk/mgalazyn/fix/rename-stak…
Browse files Browse the repository at this point in the history
…e-address-output-field

Rename stake-address-info field: stakeDelegation -> delegation for eras prior to Conway
  • Loading branch information
carbolymer authored Nov 28, 2023
2 parents 3379069 + 7de7cfb commit 1cc239c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-11-20"
CABAL_CACHE_VERSION: "2023-11-28"

concurrency:
group: >
Expand Down
7 changes: 5 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ runQueryStakeAddressInfoCmd

return $ do
writeStakeAddressInfo
era
mOutFile
(DelegationsAndRewards (stakeRewardAccountBalances, stakePools))
(Map.mapKeys (makeStakeAddress networkId) stakeDelegDeposits)
Expand All @@ -832,12 +833,14 @@ runQueryStakeAddressInfoCmd
-- -------------------------------------------------------------------------------------------------

writeStakeAddressInfo
:: Maybe (File () Out)
:: CardanoEra era
-> Maybe (File () Out)
-> DelegationsAndRewards
-> Map StakeAddress Lovelace -- ^ deposits
-> Map StakeAddress (L.DRep L.StandardCrypto) -- ^ vote delegatees
-> ExceptT QueryCmdError IO ()
writeStakeAddressInfo
era
mOutFile
(DelegationsAndRewards (stakeAccountBalances, stakePools))
stakeDelegDeposits
Expand All @@ -851,7 +854,7 @@ writeStakeAddressInfo
(\(addr, mBalance, mPoolId, mDRep, mDeposit) ->
Aeson.object
[ "address" .= addr
, "stakeDelegation" .= mPoolId
, forEraInEon @ConwayEraOnwards era "delegation" (const "stakeDelegation") .= mPoolId
, "voteDelegation" .= fmap friendlyDRep mDRep
, "rewardAccountBalance" .= mBalance
, "delegationDeposit" .= mDeposit
Expand Down

0 comments on commit 1cc239c

Please sign in to comment.