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

Template: remove useless code from the module template #2705

Closed
fadeev opened this issue Aug 8, 2022 · 2 comments · Fixed by #2708
Closed

Template: remove useless code from the module template #2705

fadeev opened this issue Aug 8, 2022 · 2 comments · Fixed by #2708
Assignees
Labels
component:scaffold Feature, enhancement, or refactor related to scaffolding. good first issue Good for newcomers

Comments

@fadeev
Copy link
Contributor

fadeev commented Aug 8, 2022

Remove the RegisterCodec function from module.go.

func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
}

RegisterCodec has been renamed to RegisterLegacyAminoCodec (which we already have in the template) a long time ago, so it's just purely unnecessary.

Remove RegisterRESTRoutes. It has been deprecated and is no longer used in the new v0.46 app.go template.

// RegisterRESTRoutes registers the capability module's REST service handlers.
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
}

Comments in the template mention the capability module, which might confuse new devs. Those should be removed as well.

@fadeev fadeev added good first issue Good for newcomers component:scaffold Feature, enhancement, or refactor related to scaffolding. labels Aug 8, 2022
@fadeev fadeev changed the title Template: remove RegisterCodec from the module template Template: remove useless code from the module template Aug 8, 2022
@fadeev fadeev self-assigned this Aug 8, 2022
@nitinmewar
Copy link

nitinmewar commented Aug 8, 2022

can I start working on it?

@fadeev
Copy link
Contributor Author

fadeev commented Aug 8, 2022

Sorry, it has a PR already associated with it.

@ilgooz ilgooz linked a pull request Aug 8, 2022 that will close this issue
@fadeev fadeev closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:scaffold Feature, enhancement, or refactor related to scaffolding. good first issue Good for newcomers
Projects
None yet
2 participants