Skip to content

Commit

Permalink
Merge PR #3050: Add generate-only option to withdraw-rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsam authored and cwgoes committed Dec 10, 2018
1 parent 7d55bd1 commit da7f459
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/distribution/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cli

import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -88,6 +89,10 @@ func GetCmdWithdrawRewards(cdc *codec.Codec) *cobra.Command {
msg = types.NewMsgWithdrawDelegatorRewardsAll(delAddr)
}

if cliCtx.GenerateOnly {
return utils.PrintUnsignedStdTx(os.Stdout, txBldr, cliCtx, []sdk.Msg{msg}, false)
}

// build and sign the transaction, then broadcast to Tendermint
return utils.CompleteAndBroadcastTxCli(txBldr, cliCtx, []sdk.Msg{msg})
},
Expand Down

0 comments on commit da7f459

Please sign in to comment.