From eac5ac1327f4f5e0caaa0c2ba4d3d4d814ea674c Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Sun, 17 Mar 2024 23:31:54 +0100 Subject: [PATCH] fix(templates): set correct signer (#4021) (cherry picked from commit 7fa1dbb2cb7b67660c0f567e66fa7eaffc1897c1) --- changelog.md | 1 + .../x/{{moduleName}}/keeper/msg_server_{{typeName}}.go.plush | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index b2e9530a73..fbe70ea023 100644 --- a/changelog.md +++ b/changelog.md @@ -16,6 +16,7 @@ ### Fixes +- [#4021](https://github.com/ignite/cli/pull/4021) Set correct custom signer in `s list --signer ` - [#3995](https://github.com/ignite/cli/pull/3995) Fix interface check for ibc modules - [#3953](https://github.com/ignite/cli/pull/3953) Fix apps `Stdout` is redirected to `Stderr` - [#3863](https://github.com/ignite/cli/pull/3963) Fix breaking issue for app client API when reading app chain info diff --git a/ignite/templates/typed/list/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}.go.plush b/ignite/templates/typed/list/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}.go.plush index 270ab3f997..9a46eafbbb 100644 --- a/ignite/templates/typed/list/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}.go.plush +++ b/ignite/templates/typed/list/files/messages/x/{{moduleName}}/keeper/msg_server_{{typeName}}.go.plush @@ -45,7 +45,7 @@ func (k msgServer) Update<%= TypeName.UpperCamel %>(goCtx context.Context, msg } // Checks if the msg <%= MsgSigner.LowerCamel %> is the same as the current owner - if msg.<%= MsgSigner.UpperCamel %> != val.Creator { + if msg.<%= MsgSigner.UpperCamel %> != val.<%= MsgSigner.UpperCamel %> { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") } @@ -64,7 +64,7 @@ func (k msgServer) Delete<%= TypeName.UpperCamel %>(goCtx context.Context, msg } // Checks if the msg <%= MsgSigner.LowerCamel %> is the same as the current owner - if msg.<%= MsgSigner.UpperCamel %> != val.Creator { + if msg.<%= MsgSigner.UpperCamel %> != val.<%= MsgSigner.UpperCamel %> { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") }