Skip to content

Commit

Permalink
Fix amino codec route (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon authored Feb 25, 2022
1 parent 099bc9f commit c8e40bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions x/pool-incentives/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestMarshalUnmarshalGenesis(t *testing.T) {

genesis := testGenesis
pool_incentives.InitGenesis(ctx, *app.PoolIncentivesKeeper, &genesis)
assert.Equal(t, app.PoolIncentivesKeeper.GetDistrInfo(ctx), *testGenesis.DistrInfo)

genesisExported := am.ExportGenesis(ctx, appCodec)
assert.NotPanics(t, func() {
Expand All @@ -53,6 +54,7 @@ func TestMarshalUnmarshalGenesis(t *testing.T) {
ctx = ctx.WithBlockTime(now.Add(time.Second))
am := pool_incentives.NewAppModule(appCodec, *app.PoolIncentivesKeeper)
am.InitGenesis(ctx, appCodec, genesisExported)

})
}

Expand Down
13 changes: 6 additions & 7 deletions x/superfluid/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ import (
)

func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgSuperfluidDelegate{}, "osmosis/superfluid/superfluid-delegate", nil)
cdc.RegisterConcrete(&MsgSuperfluidUndelegate{}, "osmosis/superfluid/superfluid-undelegate", nil)
cdc.RegisterConcrete(&MsgLockAndSuperfluidDelegate{}, "osmosis/superfluid/lock-and-superfluid-delegate", nil)
cdc.RegisterConcrete(&MsgSuperfluidUnbondLock{}, "osmosis/superfluid/superfluid-unbond-lock", nil)
cdc.RegisterConcrete(&SetSuperfluidAssetsProposal{}, "osmosis/superfluid/set-superfluid-assets-proposal", nil)
cdc.RegisterConcrete(&RemoveSuperfluidAssetsProposal{}, "osmosis/superfluid/remove-superfluid-assets-proposal", nil)
cdc.RegisterConcrete(&MsgSuperfluidDelegate{}, "osmosis/superfluid-delegate", nil)
cdc.RegisterConcrete(&MsgSuperfluidUndelegate{}, "osmosis/superfluid-undelegate", nil)
cdc.RegisterConcrete(&MsgLockAndSuperfluidDelegate{}, "osmosis/lock-and-superfluid-delegate", nil)
cdc.RegisterConcrete(&MsgSuperfluidUnbondLock{}, "osmosis/superfluid-unbond-lock", nil)
cdc.RegisterConcrete(&SetSuperfluidAssetsProposal{}, "osmosis/set-superfluid-assets-proposal", nil)
cdc.RegisterConcrete(&RemoveSuperfluidAssetsProposal{}, "osmosis/del-superfluid-assets-proposal", nil)
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgSuperfluidDelegate{},
&MsgSuperfluidUndelegate{},
// &MsgSuperfluidRedelegate{},
&MsgLockAndSuperfluidDelegate{},
&MsgSuperfluidUnbondLock{},
)
Expand Down

0 comments on commit c8e40bb

Please sign in to comment.