From 55e9020eefe84ba648ac3c812bcad188037bfa52 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 25 Mar 2024 20:40:27 +0100 Subject: [PATCH] fix codec --- x/auction/codec.go | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/x/auction/codec.go b/x/auction/codec.go index 02bfe51744..38032406f2 100644 --- a/x/auction/codec.go +++ b/x/auction/codec.go @@ -5,14 +5,14 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" - "github.com/cosmos/gogoproto/proto" + // "github.com/cosmos/cosmos-sdk/types/msgservice" ) +// Amino codecs +// Note, the ModuleCdc should ONLY be used in certain instances of tests and for JSON +// encoding as Amino is still used for that purpose. var ( - amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/auction module codec. + amino = codec.NewLegacyAmino() ModuleCdc = codec.NewAminoCodec(amino) ) @@ -26,18 +26,17 @@ func init() { // concrete types on the provided LegacyAmino codec. These types are used for // Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - govSetRewardsParams := &MsgGovSetRewardsParams{} - rewardsBid := &MsgRewardsBid{} - cdc.RegisterConcrete(govSetRewardsParams, proto.MessageName(govSetRewardsParams), nil) - cdc.RegisterConcrete(rewardsBid, proto.MessageName(rewardsBid), nil) + cdc.RegisterConcrete(&MsgGovSetRewardsParams{}, "umee/auction/MsgGovSetRewardsParams", nil) + cdc.RegisterConcrete(&MsgRewardsBid{}, "umee/auction/MsgRewardsBid", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &MsgGovSetRewardsParams{}, - &MsgRewardsBid{}, + // &MsgGovSetRewardsParams{}, + // &MsgRewardsBid{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + // TODO + // msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) }