Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove legacy handler #9650

Merged
merged 16 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.

2 changes: 1 addition & 1 deletion x/auth/vesting/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// 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{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we panic instead with a clear message "this method is deprecated and not implemented by the SDK anymore" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah returning just sdk.Route{} seems like it could lead to errors possibly? I'd recommend doing anything we can to encourage developers to not use deprecated functionality and panicing seems OK to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding panic is breaking RegisterRoutes. We are not registering empty router, I think returning sdk.Route{} is fine.

}

// QuerierRoute returns an empty string as the module contains no query
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.

2 changes: 1 addition & 1 deletion x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {

// Route returns the message routing key for the bank module.
aleem1314 marked this conversation as resolved.
Show resolved Hide resolved
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
25 changes: 0 additions & 25 deletions x/crisis/handler.go

This file was deleted.

Loading