From 8f43ae42cf1ea7240e658cd1c8c7ade1bd8cc979 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Mon, 16 Sep 2024 20:36:34 +0200 Subject: [PATCH] chore: remove unused `KeyPrefix` method (#4361) * remove unused key to bytes method * add changelog * remove unused variable --- changelog.md | 1 + .../files/base/x/{{moduleName}}/types/genesis.go.plush | 3 --- .../files/base/x/{{moduleName}}/types/keys.go.plush | 9 ++------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/changelog.md b/changelog.md index d4050f4590..e9d8d49741 100644 --- a/changelog.md +++ b/changelog.md @@ -41,6 +41,7 @@ - [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files - [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency - [#4328](https://github.com/ignite/cli/pull/4328) Send ignite bug report to sentry. Opt out the same way as for usage analytics +- [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method ### Fixes diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/genesis.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/genesis.go.plush index bb4de5a6f5..9c741f7f66 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/genesis.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/genesis.go.plush @@ -1,8 +1,5 @@ package types -// DefaultIndex is the default global index -const DefaultIndex uint64 = 1 - // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/keys.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/keys.go.plush index 8cffd96e7d..3398f3ee49 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/keys.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/keys.go.plush @@ -15,12 +15,7 @@ const ( <%= if (isIBC) { %>// this line is used by starport scaffolding # ibc/keys/name<% } %> ) -var ( - ParamsKey = collections.NewPrefix("p_<%= moduleName %>") -) - <%= if (isIBC) { %>// this line is used by starport scaffolding # ibc/keys/port<% } %> -func KeyPrefix(p string) []byte { - return []byte(p) -} \ No newline at end of file +// ParamsKey is the prefix to retrieve all Params +var ParamsKey = collections.NewPrefix("p_<%= moduleName %>")