Skip to content

Commit

Permalink
fix: fix missing id in message
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Mar 1, 2022
1 parent 74298c2 commit c8f81fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions x/knowledge/client/cli/tx_bang_dataspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ var _ = strconv.Itoa(0)

func CmdBangDataspace() *cobra.Command {
cmd := &cobra.Command{
Use: "bang-dataspace [name] [description]",
Short: "Broadcast message bang-dataspace",
Args: cobra.ExactArgs(2),
Use: "bang-dataspace [id] [name] [description]",
Short: "Create a new dataspace given its identifier (unique), name and description.",
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argName := args[0]
argDescription := args[1]
argID := args[0]
argName := args[1]
argDescription := args[2]

clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
Expand All @@ -28,6 +29,7 @@ func CmdBangDataspace() *cobra.Command {

msg := types.NewMsgBangDataspace(
clientCtx.GetFromAddress().String(),
argID,
argName,
argDescription,
)
Expand Down
3 changes: 2 additions & 1 deletion x/knowledge/types/message_bang_dataspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const TypeMsgBangDataspace = "bang_dataspace"

var _ sdk.Msg = &MsgBangDataspace{}

func NewMsgBangDataspace(creator string, name string, description string) *MsgBangDataspace {
func NewMsgBangDataspace(creator string, id string, name string, description string) *MsgBangDataspace {
return &MsgBangDataspace{
Creator: creator,
Id: id,
Name: name,
Description: description,
}
Expand Down

0 comments on commit c8f81fe

Please sign in to comment.