Skip to content

Commit

Permalink
feat!: remove legacy handler (#9650)
Browse files Browse the repository at this point in the history
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #7517 
ref: [comment](#9594 (comment))

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
aleem1314 authored Jul 19, 2021
1 parent 481aa2e commit 48cb9ea
Show file tree
Hide file tree
Showing 36 changed files with 123 additions and 2,315 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) `types/rest` package moved to `testutil/rest`.
* [\#9432](https://github.com/cosmos/cosmos-sdk/pull/9432) `ConsensusParamsKeyTable` moved from `params/keeper` to `params/types`
* [\#9576](https://github.com/cosmos/cosmos-sdk/pull/9576) Add debug error message to `sdkerrors.QueryResult` when enabled
* [\#9650](https://github.com/cosmos/cosmos-sdk/pull/9650) Removed deprecated message handler implementation from the SDK modules.

### Client Breaking Changes

Expand Down
6 changes: 4 additions & 2 deletions x/auth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ func (AppModule) Name() string {
// RegisterInvariants performs a no-op.
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the auth module.
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the message routing key for the auth module.
func (AppModule) Route() sdk.Route {
return sdk.Route{}
}

// QuerierRoute returns the auth module's querier route name.
func (AppModule) QuerierRoute() string {
Expand Down
26 changes: 0 additions & 26 deletions x/auth/vesting/handler.go

This file was deleted.

97 changes: 0 additions & 97 deletions x/auth/vesting/handler_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions x/auth/vesting/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func NewAppModule(ak keeper.AccountKeeper, bk types.BankKeeper) AppModule {
// RegisterInvariants performs a no-op; there are no invariants to enforce.
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the module's message router and handler.
// Deprecated: Route returns the module's message router and handler.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.accountKeeper, am.bankKeeper))
return sdk.Route{}
}

// QuerierRoute returns an empty string as the module contains no query
Expand Down
4 changes: 2 additions & 2 deletions x/authz/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func (AppModule) Name() string {
// RegisterInvariants does nothing, there are no invariants to enforce
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// Route returns the message routing key for the staking module.
// Deprecated: Route returns the message routing key for the authz module.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(authz.RouterKey, nil)
return sdk.Route{}
}

func (am AppModule) NewHandler() sdk.Handler {
Expand Down
30 changes: 0 additions & 30 deletions x/bank/handler.go

This file was deleted.

88 changes: 0 additions & 88 deletions x/bank/handler_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper)
}

// Route returns the message routing key for the bank module.
// Deprecated: Route returns the message routing key for the bank module.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
return sdk.Route{}
}

// QuerierRoute returns the bank module's querier route name.
Expand Down
6 changes: 4 additions & 2 deletions x/capability/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the capability module's message routing key.
func (AppModule) Route() sdk.Route { return sdk.Route{} }
// Deprecated: Route returns the capability module's message routing key.
func (AppModule) Route() sdk.Route {
return sdk.Route{}
}

// QuerierRoute returns the capability module's query routing key.
func (AppModule) QuerierRoute() string { return "" }
Expand Down
25 changes: 0 additions & 25 deletions x/crisis/handler.go

This file was deleted.

Loading

0 comments on commit 48cb9ea

Please sign in to comment.