Skip to content

Commit

Permalink
codec refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsingh33 committed Jun 17, 2024
1 parent f73471b commit d968695
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
4 changes: 0 additions & 4 deletions x/bandoracle/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ func (AppModuleBasic) Name() string {
return types.ModuleName
}

func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
}

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
}
Expand Down
1 change: 0 additions & 1 deletion x/bandoracle/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {

var (
Amino = codec.NewLegacyAmino()
// ModuleCdc = codec.NewAminoCodec(Amino)
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
6 changes: 1 addition & 5 deletions x/esm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ func (AppModuleBasic) Name() string {
return types.ModuleName
}

func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
}

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
types.RegisterLegacyAminoCodec(cdc)
}

// RegisterInterfaces registers the module's interface types
Expand Down
4 changes: 2 additions & 2 deletions x/esm/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)

func RegisterCodec(cdc *codec.LegacyAmino) {
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgDepositESM{}, "comdex/esm/deposit-esm", nil)
cdc.RegisterConcrete(&MsgExecuteESM{}, "comdex/esm/execute-esm", nil)
cdc.RegisterConcrete(&MsgKillRequest{}, "comdex/esm/stop-all-actions", nil)
Expand Down Expand Up @@ -40,7 +40,7 @@ var (
)

func init() {
RegisterCodec(Amino)
RegisterLegacyAminoCodec(Amino)
cryptocodec.RegisterCrypto(Amino)
Amino.Seal()
}
4 changes: 0 additions & 4 deletions x/lend/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ func (AppModuleBasic) Name() string {
return types.ModuleName
}

//func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) {
// types.RegisterCodec(cdc)
//}

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterLegacyAminoCodec(cdc)
}
Expand Down

0 comments on commit d968695

Please sign in to comment.