refactor(client): add client/Context.Codec and deprecate JSONCodec (#9498)
* chore(types): add sdk.Context.Codec and deprecate JSONCodec * Use clientContext.Codec rather than JSONCodec everywhere * update tests to use clientContext.Codec * added a note that EncodingConfig.Marshaler will be renamed to Codec * update changelog * fix tests to use clientCtx.WithCodec instead of WithJSONCodec * fix genutil build * Update simapp/params/encoding.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ func Cmd() *cobra.Command {
|
||||
// getPubKeyFromString decodes SDK PubKey using JSON marshaler.
|
||||
func getPubKeyFromString(ctx client.Context, pkstr string) (cryptotypes.PubKey, error) {
|
||||
var pk cryptotypes.PubKey
|
||||
err := ctx.JSONCodec.UnmarshalInterfaceJSON([]byte(pkstr), &pk)
|
||||
err := ctx.Codec.UnmarshalInterfaceJSON([]byte(pkstr), &pk)
|
||||
return pk, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user