Skip to content

Commit

Permalink
fix tx_vote cmd arg
Browse files Browse the repository at this point in the history
  • Loading branch information
akremstudy committed Oct 31, 2023
1 parent 842e52b commit 1085510
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions x/dispute/client/cli/tx_vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package cli
import (
"strconv"

"encoding/json"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -23,7 +25,8 @@ func CmdVote() *cobra.Command {
if err != nil {
return err
}
argVote, err := cast.ToBoolE(args[1])
argVote := new(types.VoteEnum)
err = json.Unmarshal([]byte(args[1]), argVote)
if err != nil {
return err
}
Expand All @@ -36,7 +39,7 @@ func CmdVote() *cobra.Command {
msg := types.NewMsgVote(
clientCtx.GetFromAddress().String(),
argId,
argVote,
*argVote,
)
if err := msg.ValidateBasic(); err != nil {
return err
Expand Down

0 comments on commit 1085510

Please sign in to comment.