Rename clientCtx.JSONMarshaler to JSONCodec (#9251)

* Rename clientCtx.JSONMarshaler to JSONCodec

* change md files

* Fix lint
This commit is contained in:
Amaury
2021-05-03 14:45:47 +00:00
committed by GitHub
parent d3bcc15b11
commit d19791be89
66 changed files with 220 additions and 219 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t
serverCtx := server.NewDefaultContext()
serverCtx.Config.RootDir = tempDir
clientCtx := client.Context{}.WithJSONMarshaler(app.AppCodec())
clientCtx := client.Context{}.WithJSONCodec(app.AppCodec())
genDoc := newDefaultGenesisDoc(encCfg.Marshaler)
require.NoError(t, saveGenesisFile(genDoc, serverCtx.Config.GenesisFile()))
+1 -1
View File
@@ -347,7 +347,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
Retries: config.Rosetta.Retries,
Offline: offlineMode,
}
conf.WithCodec(clientCtx.InterfaceRegistry, clientCtx.JSONMarshaler.(*codec.ProtoCodec))
conf.WithCodec(clientCtx.InterfaceRegistry, clientCtx.JSONCodec.(*codec.ProtoCodec))
rosettaSrv, err = rosetta.ServerFromConfig(conf)
if err != nil {
+1 -1
View File
@@ -55,7 +55,7 @@ func ShowValidatorCmd() *cobra.Command {
return err
}
clientCtx := client.GetClientContextFromCmd(cmd)
bz, err := clientCtx.JSONMarshaler.MarshalInterfaceJSON(sdkPK)
bz, err := clientCtx.JSONCodec.MarshalInterfaceJSON(sdkPK)
if err != nil {
return err
}