Skip to content

Commit

Permalink
Remove more x/params dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu committed Mar 13, 2023
1 parent a62324f commit d7f7734
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ import (
nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper"
nftmodule "github.com/cosmos/cosmos-sdk/x/nft/module"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
"github.com/cosmos/cosmos-sdk/x/slashing"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand Down Expand Up @@ -196,7 +194,6 @@ var (
gov.NewAppModuleBasic(
append(
wasmclient.ProposalHandlers,
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
Expand Down Expand Up @@ -489,7 +486,6 @@ func NewWasmApp(
// See: https://docs.cosmos.network/main/modules/gov#proposal-messages
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

Expand Down
3 changes: 1 addition & 2 deletions x/wasm/keeper/keeper_no_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package keeper
import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

"github.com/CosmWasm/wasmd/x/wasm/types"
)
Expand All @@ -15,7 +14,6 @@ import (
func NewKeeper(
cdc codec.Codec,
storeKey storetypes.StoreKey,
paramSpace paramtypes.Subspace,
accountKeeper types.AccountKeeper,
bankKeeper types.BankKeeper,
stakingKeeper types.StakingKeeper,
Expand All @@ -29,6 +27,7 @@ func NewKeeper(
homeDir string,
wasmConfig types.WasmConfig,
availableCapabilities string,
authority string,
opts ...Option,
) Keeper {
panic("not implemented, please build with cgo enabled")
Expand Down
4 changes: 0 additions & 4 deletions x/wasm/keeper/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/mint"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
"github.com/cosmos/cosmos-sdk/x/slashing"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/cosmos/cosmos-sdk/x/staking"
Expand Down Expand Up @@ -90,7 +88,6 @@ var moduleBasics = module.NewBasicManager(
mint.AppModuleBasic{},
distribution.AppModuleBasic{},
gov.NewAppModuleBasic([]govclient.ProposalHandler{
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
}),
Expand Down Expand Up @@ -441,7 +438,6 @@ func createTestInput(

govRouter := govv1beta1.NewRouter().
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(paramsKeeper)).
AddRoute(types.RouterKey, NewWasmProposalHandler(&keeper, types.EnableAllProposals))

govKeeper := govkeeper.NewKeeper(
Expand Down

0 comments on commit d7f7734

Please sign in to comment.