Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -4,6 +4,7 @@

### Fixes

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

## [`v29.7.0`](https://github.com/ignite/cli/releases/tag/v29.7.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"<%= ModulePath %>/x/<%= ModuleName %>/types"
)

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

// TODO: Handle the <%= MsgName.UpperCamel %> simulation
// TODO: Handle the <%= MsgName.PascalCase %> simulation

return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= MsgName.UpperCamel %> simulation not implemented"), nil, nil
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= MsgName.PascalCase %> simulation not implemented"), nil, nil
}
}
6 changes: 3 additions & 3 deletions ignite/templates/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ func protoTxMessageModify(opts *Options) genny.RunFn {
resFields = append(resFields, field.ToProtoField(i+1))
}

typenameUpper := opts.MsgName.UpperCamel
typenamePascal := opts.MsgName.PascalCase
msg := protoutil.NewMessage(
"Msg"+typenameUpper,
"Msg"+typenamePascal,
protoutil.WithFields(msgFields...),
protoutil.WithMessageOptions(creatorOpt),
)
msgResp := protoutil.NewMessage("Msg"+typenameUpper+"Response", protoutil.WithFields(resFields...))
msgResp := protoutil.NewMessage("Msg"+typenamePascal+"Response", protoutil.WithFields(resFields...))
protoutil.Append(protoFile, msg, msgResp)

// Ensure custom types are imported
Expand Down