fix (harvest-cli): parse correct arg index (#669)

This commit is contained in:
Kevin Davis 2020-09-27 11:47:49 -04:00 committed by GitHub
parent 5ce045f46f
commit 8e01b0b3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,11 +104,11 @@ func getCmdClaimReward(cdc *codec.Codec) *cobra.Command {
inBuf := bufio.NewReader(cmd.InOrStdin())
cliCtx := context.NewCLIContext().WithCodec(cdc)
txBldr := auth.NewTxBuilderFromCLI(inBuf).WithTxEncoder(utils.GetTxEncoder(cdc))
receiver, err := sdk.AccAddressFromBech32(args[1])
receiver, err := sdk.AccAddressFromBech32(args[0])
if err != nil {
return err
}
msg := types.NewMsgClaimReward(cliCtx.GetFromAddress(), receiver, args[2], args[3], args[4])
msg := types.NewMsgClaimReward(cliCtx.GetFromAddress(), receiver, args[1], args[2], args[3])
if err := msg.ValidateBasic(); err != nil {
return err
}