diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index ee82498e8273..0a51b2e8e40a 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -3,6 +3,7 @@ package cli import ( "fmt" + "os" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -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}) },