Skip to content

Commit

Permalink
fix codec
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Mar 25, 2024
1 parent 3495557 commit 55e9020
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions x/auction/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

Expand All @@ -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)
}

0 comments on commit 55e9020

Please sign in to comment.