Skip to content

Commit

Permalink
fix: register deprecated params for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mbreithecker committed Feb 14, 2025
1 parent 9927379 commit 5a181b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/upgrades/v2_0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v2_0
import (
"context"
"fmt"

poolkeeper "github.com/KYVENetwork/chain/x/pool/keeper"

multicoinrewardskeeper "github.com/KYVENetwork/chain/x/multi_coin_rewards/keeper"
Expand Down
1 change: 1 addition & 0 deletions x/delegation/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {

// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message
func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(reg)
}

// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing
Expand Down
5 changes: 5 additions & 0 deletions x/delegation/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ package types

import (
"github.com/cosmos/cosmos-sdk/codec"
codecTypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptoCodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func RegisterInterfaces(registry codecTypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{})
}

var Amino = codec.NewLegacyAmino()

func init() {
Expand Down
2 changes: 2 additions & 0 deletions x/stakers/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"github.com/KYVENetwork/chain/x/stakers/types_v1beta1"
"github.com/cosmos/cosmos-sdk/codec"
codecTypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptoCodec "github.com/cosmos/cosmos-sdk/crypto/codec"
Expand All @@ -21,6 +22,7 @@ func RegisterInterfaces(registry codecTypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgJoinPool{})
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgLeavePool{})
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{})
registry.RegisterImplementations((*sdk.Msg)(nil), &types_v1beta1.MsgUpdateParams{})
}

var Amino = codec.NewLegacyAmino()
Expand Down

0 comments on commit 5a181b4

Please sign in to comment.