remove errors module

This commit is contained in:
Jae Kwon
2017-10-31 17:58:12 -05:00
parent 8d305039c8
commit 561d77cae0
6 changed files with 0 additions and 409 deletions
-35
View File
@@ -1,35 +0,0 @@
package commands
import (
"github.com/spf13/pflag"
"github.com/spf13/viper"
sdk "github.com/cosmos/cosmos-sdk"
txcmd "github.com/cosmos/cosmos-sdk/client/commands/txs"
"github.com/cosmos/cosmos-sdk/modules/auth"
)
//nolint
const (
FlagMulti = "multi"
)
// SigWrapper wraps a tx with a signature layer to hold pubkey sigs
type SigWrapper struct{}
var _ txcmd.Wrapper = SigWrapper{}
// Wrap will wrap the tx with OneSig or MultiSig depending on flags
func (SigWrapper) Wrap(tx sdk.Tx) (res sdk.Tx, err error) {
if !viper.GetBool(FlagMulti) {
res = auth.NewSig(tx).Wrap()
} else {
res = auth.NewMulti(tx).Wrap()
}
return
}
// Register adds the sequence flags to the cli
func (SigWrapper) Register(fs *pflag.FlagSet) {
fs.Bool(FlagMulti, false, "Prepare the tx for multisig")
}