From b7daf23366f34c3efb734e7d444f4a890aa4e491 Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Mon, 12 Nov 2018 10:55:24 -0800 Subject: [PATCH] R4R: Fix unbonding command flow (#2727) --- PENDING.md | 1 + x/stake/client/cli/tx.go | 18 ++---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/PENDING.md b/PENDING.md index 48d5fe0e1fac..25cf75bc64a2 100644 --- a/PENDING.md +++ b/PENDING.md @@ -5,6 +5,7 @@ BREAKING CHANGES * Gaia REST API (`gaiacli advanced rest-server`) * Gaia CLI (`gaiacli`) + * [cli] [\#2727](https://github.com/cosmos/cosmos-sdk/pull/2727) Fix unbonding command flow * Gaia diff --git a/x/stake/client/cli/tx.go b/x/stake/client/cli/tx.go index 3b8d8e2009fa..5064999298a4 100644 --- a/x/stake/client/cli/tx.go +++ b/x/stake/client/cli/tx.go @@ -2,6 +2,7 @@ package cli import ( "fmt" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/client/utils" @@ -284,22 +285,7 @@ func GetCmdBeginRedelegate(storeName string, cdc *codec.Codec) *cobra.Command { func GetCmdUnbond(storeName string, cdc *codec.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "unbond", - Short: "begin or complete unbonding shares from a validator", - } - - cmd.AddCommand( - client.PostCommands( - GetCmdBeginUnbonding(storeName, cdc), - )...) - - return cmd -} - -// GetCmdBeginUnbonding implements the begin unbonding validator command. -func GetCmdBeginUnbonding(storeName string, cdc *codec.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "begin", - Short: "begin unbonding", + Short: "unbond shares from a validator", RunE: func(cmd *cobra.Command, args []string) error { txBldr := authtxb.NewTxBuilderFromCLI().WithCodec(cdc) cliCtx := context.NewCLIContext().