Moved the handlers from stack into modules

This commit is contained in:
Ethan Frey
2017-07-06 16:00:54 +02:00
parent 768427dcc0
commit a047e210fa
18 changed files with 104 additions and 72 deletions
+3 -3
View File
@@ -13,8 +13,8 @@ import (
txcmd "github.com/tendermint/light-client/commands/txs"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/basecoin/modules/auth"
"github.com/tendermint/basecoin/modules/coin"
"github.com/tendermint/basecoin/stack"
"github.com/tendermint/basecoin/txs"
)
@@ -82,7 +82,7 @@ func readSendTxFlags() (tx basecoin.Tx, err error) {
if err != nil {
return tx, err
}
toAddr := stack.SigPerm(to)
toAddr := auth.SigPerm(to)
toAddr.ChainID = chain
// //parse the fee and amounts into coin types
@@ -102,7 +102,7 @@ func readSendTxFlags() (tx basecoin.Tx, err error) {
var fromAddr basecoin.Actor
signer := txcmd.GetSigner()
if !signer.Empty() {
fromAddr = stack.SigPerm(signer.Address())
fromAddr = auth.SigPerm(signer.Address())
}
// craft the inputs and outputs
+2 -2
View File
@@ -11,8 +11,8 @@ import (
proofcmd "github.com/tendermint/light-client/commands/proofs"
"github.com/tendermint/light-client/proofs"
"github.com/tendermint/basecoin/modules/auth"
"github.com/tendermint/basecoin/modules/coin"
"github.com/tendermint/basecoin/stack"
)
// AccountQueryCmd - command to query an account
@@ -27,7 +27,7 @@ func doAccountQuery(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
key := coin.NewAccountant("").MakeKey(stack.SigPerm(addr))
key := coin.NewAccountant("").MakeKey(auth.SigPerm(addr))
acc := coin.Account{}
proof, err := proofcmd.GetAndParseAppProof(key, &acc)