Skip to content

Commit 8ae1716

Browse files
authored
fix: mismatch for message names (#4864)
* fix: mismatch for message names * add changelog
1 parent 015bcb1 commit 8ae1716

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixes
66

7+
- [#4864](https://github.com/ignite/cli/pull/4864) Mismatch for message names.
78
- [#4735](https://github.com/ignite/cli/issues/4735) Cleanup `xgenny` runner to avoid duplicated generators.
89

910
## [`v29.7.0`](https://github.com/ignite/cli/releases/tag/v29.7.0)

ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"<%= ModulePath %>/x/<%= ModuleName %>/types"
1212
)
1313

14-
func SimulateMsg<%= MsgName.UpperCamel %>(
14+
func SimulateMsg<%= MsgName.PascalCase %>(
1515
ak types.AuthKeeper,
1616
bk types.BankKeeper,
1717
k keeper.Keeper,
@@ -20,12 +20,12 @@ func SimulateMsg<%= MsgName.UpperCamel %>(
2020
return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
2121
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
2222
simAccount, _ := simtypes.RandomAcc(r, accs)
23-
msg := &types.Msg<%= MsgName.UpperCamel %>{
23+
msg := &types.Msg<%= MsgName.PascalCase %>{
2424
<%= MsgSigner.UpperCamel %>: simAccount.Address.String(),
2525
}
2626

27-
// TODO: Handle the <%= MsgName.UpperCamel %> simulation
27+
// TODO: Handle the <%= MsgName.PascalCase %> simulation
2828

29-
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= MsgName.UpperCamel %> simulation not implemented"), nil, nil
29+
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= MsgName.PascalCase %> simulation not implemented"), nil, nil
3030
}
3131
}

ignite/templates/message/message.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ func protoTxMessageModify(opts *Options) genny.RunFn {
139139
resFields = append(resFields, field.ToProtoField(i+1))
140140
}
141141

142-
typenameUpper := opts.MsgName.UpperCamel
142+
typenamePascal := opts.MsgName.PascalCase
143143
msg := protoutil.NewMessage(
144-
"Msg"+typenameUpper,
144+
"Msg"+typenamePascal,
145145
protoutil.WithFields(msgFields...),
146146
protoutil.WithMessageOptions(creatorOpt),
147147
)
148-
msgResp := protoutil.NewMessage("Msg"+typenameUpper+"Response", protoutil.WithFields(resFields...))
148+
msgResp := protoutil.NewMessage("Msg"+typenamePascal+"Response", protoutil.WithFields(resFields...))
149149
protoutil.Append(protoFile, msg, msgResp)
150150

151151
// Ensure custom types are imported

0 commit comments

Comments
 (0)