Skip to content

Commit

Permalink
fix: remove bakerId field from generated validator keys
Browse files Browse the repository at this point in the history
Otherwise bakerId and validatorId are shown.
  • Loading branch information
drsk committed Jan 29, 2025
1 parent fb4270c commit 5163d46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Concordium/Client/Cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ data BakerCredentials = BakerCredentials
}

instance AE.ToJSON BakerCredentials where
toJSON BakerCredentials{..} = object (("bakerId" .= bcIdentity) : ("validatorId" .= bcIdentity) : bakerKeysToPairs bcKeys)
toJSON BakerCredentials{..} = object (("validatorId" .= bcIdentity) : bakerKeysToPairs bcKeys)

instance AE.FromJSON BakerKeys where
parseJSON = withObject "Baker keys" $ \v -> do
Expand Down Expand Up @@ -300,7 +300,7 @@ bakerKeysToPairs v =
"signatureSignKey" .= bkSigSignKey v,
"signatureVerifyKey" .= bkSigVerifyKey v
]
++ concat [["bakerId" .= bid, "validatorId" .= bid] | bid <- maybeToList (bkBakerId v)]
++ concat [["validatorId" .= bid] | bid <- maybeToList (bkBakerId v)]

instance AE.ToJSON BakerKeys where
toJSON = object . bakerKeysToPairs
Expand All @@ -312,7 +312,7 @@ bakerPublicKeysToPairs v =
"electionVerifyKey" .= bkElectionVerifyKey v,
"signatureVerifyKey" .= bkSigVerifyKey v
]
++ concat [["bakerId" .= bid, "validatorId" .= bid] | bid <- maybeToList (bkBakerId v)]
++ concat [["validatorId" .= bid] | bid <- maybeToList (bkBakerId v)]

-- | Hardcoded network ID.
defaultNetId :: Int
Expand Down

0 comments on commit 5163d46

Please sign in to comment.