From 13521b3f77c75613173fcff0bb2cbc20bc28cd0d Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Mon, 9 Apr 2018 17:33:53 +0200 Subject: [PATCH] Remove deadcode --- x/bank/commands/sendtx.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/x/bank/commands/sendtx.go b/x/bank/commands/sendtx.go index ee4625eac292..aa0e17a9103c 100644 --- a/x/bank/commands/sendtx.go +++ b/x/bank/commands/sendtx.go @@ -7,12 +7,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/wire" "github.com/cosmos/cosmos-sdk/x/bank" - cryptokeys "github.com/tendermint/go-crypto/keys" ) const ( @@ -80,29 +78,3 @@ func BuildMsg(from sdk.Address, to sdk.Address, coins sdk.Coins) sdk.Msg { msg := bank.NewSendMsg([]bank.Input{input}, []bank.Output{output}) return msg } - -func (c Commander) SignMessage(msg sdk.Msg, kb cryptokeys.Keybase, accountName string, password string) ([]byte, error) { - // sign and build - bz := msg.GetSignBytes() - sig, pubkey, err := kb.Sign(accountName, password, bz) - if err != nil { - return nil, err - } - sigs := []sdk.StdSignature{{ - PubKey: pubkey, - Signature: sig, - Sequence: viper.GetInt64(client.FlagName), - }} - - // TODO: fees - var fee sdk.StdFee - - // marshal bytes - tx := sdk.NewStdTx(msg, fee, sigs) - - txBytes, err := c.Cdc.MarshalBinary(tx) - if err != nil { - return nil, err - } - return txBytes, nil -}