Skip to content

Commit

Permalink
Merge pull request cosmos#821 from cosmos/adrian/deadcode
Browse files Browse the repository at this point in the history
Remove deadcode
  • Loading branch information
rigelrozanski authored Apr 10, 2018
2 parents 18ac0f9 + 13521b3 commit e588ebf
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions x/bank/commands/sendtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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
}

0 comments on commit e588ebf

Please sign in to comment.