From 8e01b0b3f40a33db362521270486d776646275cb Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Sun, 27 Sep 2020 11:47:49 -0400 Subject: [PATCH] fix (harvest-cli): parse correct arg index (#669) --- x/harvest/client/cli/tx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/harvest/client/cli/tx.go b/x/harvest/client/cli/tx.go index 403c36a6..f4102891 100644 --- a/x/harvest/client/cli/tx.go +++ b/x/harvest/client/cli/tx.go @@ -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 }