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:
@@ -238,7 +238,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
|
||||
return err
|
||||
}
|
||||
|
||||
if err := clientCtx.JSONCodec.UnmarshalJSON(resByTxQuery, &vote); err != nil {
|
||||
if err := clientCtx.Codec.UnmarshalJSON(resByTxQuery, &vote); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -387,7 +387,7 @@ $ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
clientCtx.JSONCodec.MustUnmarshalJSON(resByTxQuery, &deposit)
|
||||
clientCtx.Codec.MustUnmarshalJSON(resByTxQuery, &deposit)
|
||||
return clientCtx.PrintProto(&deposit)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user