Skip to content

Commit

Permalink
Merge pull request #63 from decentrio/fix-metadata
Browse files Browse the repository at this point in the history
Fix metadata
  • Loading branch information
cgdusek authored Mar 9, 2024
2 parents 34b76e7 + cfa6218 commit 90e66ab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ func New(
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
)
app.MarketKeeper = *marketkeeper.NewKeeper(
appCodec,
keys[markettypes.StoreKey],
keys[markettypes.MemStoreKey],
app.GetSubspace(markettypes.ModuleName),

app.BankKeeper,
)

// register the proposal types
govRouter := govtypes.NewRouter()
Expand Down Expand Up @@ -371,14 +379,6 @@ func New(
&stakingKeeper, govRouter,
)

app.MarketKeeper = *marketkeeper.NewKeeper(
appCodec,
keys[markettypes.StoreKey],
keys[markettypes.MemStoreKey],
app.GetSubspace(markettypes.ModuleName),

app.BankKeeper,
)
marketModule := market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition
Expand Down
13 changes: 13 additions & 0 deletions x/market/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package types
import (
"github.com/cosmos/cosmos-sdk/codec"
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"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
)

func RegisterCodec(cdc *codec.LegacyAmino) {
Expand All @@ -14,6 +16,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgCreateOrder{}, "market/CreateOrder", nil)
cdc.RegisterConcrete(&MsgCancelOrder{}, "market/CancelOrder", nil)
cdc.RegisterConcrete(&MsgMarketOrder{}, "market/MarketOrder", nil)
cdc.RegisterConcrete(&DenomMetadataProposal{}, "market/DenomMetadataProposal", nil)
// this line is used by starport scaffolding # 2
}

Expand All @@ -36,6 +39,10 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgMarketOrder{},
)

registry.RegisterImplementations((*govtypes.Content)(nil),
&DenomMetadataProposal{},
)
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
Expand All @@ -45,3 +52,9 @@ var (
Amino = codec.NewLegacyAmino()
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)

func init() {
RegisterCodec(Amino)
cryptocodec.RegisterCrypto(Amino)
Amino.Seal()
}

0 comments on commit 90e66ab

Please sign in to comment.