Skip to content

Commit

Permalink
Merge #1636
Browse files Browse the repository at this point in the history
1636: Bech32 encode stake address in stake-address-info query result r=erikd a=intricate

Closes #1506 

Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
  • Loading branch information
iohk-bors[bot] and intricate authored Aug 11, 2020
2 parents 815cec2 + 53225b4 commit e45bfec
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import Prelude (String)
import Data.Aeson (ToJSON (..), (.=))
import qualified Data.Aeson as Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.HashMap.Strict (HashMap)
Expand Down Expand Up @@ -405,10 +404,8 @@ instance ToJSON DelegationsAndRewards where
(Aeson.object ["delegation" .= d, "rewardAccountBalance" .= r])
acc

toKey = Text.decodeLatin1
. B16.encode
. Ledger.serialiseRewardAcnt
. Ledger.RewardAcnt (toShelleyNetwork nw)
toKey :: Ledger.Credential Ledger.Staking TPraosStandardCrypto -> Text
toKey = serialiseAddress . StakeAddress (toShelleyNetwork nw)


-- | Query the current protocol parameters from a Shelley node via the local
Expand Down

0 comments on commit e45bfec

Please sign in to comment.