R4R: Fix unbonding command flow (#2727)

This commit is contained in:
Jack Zampolin
2018-11-12 19:55:24 +01:00
committed by Christopher Goes
parent 70826495b8
commit b7daf23366
2 changed files with 3 additions and 16 deletions
+2 -16
View File
@@ -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().