diff --git a/app/app.go b/app/app.go index 313c71933..bdcdbbbd8 100644 --- a/app/app.go +++ b/app/app.go @@ -62,8 +62,8 @@ func DefaultHandler(feeDenom string) basecoin.Handler { base.Logger{}, stack.Recovery{}, auth.Signatures{}, - nonce.ReplayCheck{}, base.Chain{}, + nonce.ReplayCheck{}, fee.NewSimpleFeeMiddleware(coin.Coin{feeDenom, 0}, fee.Bank), ).Use(d) } diff --git a/app/app_test.go b/app/app_test.go index 813c50afe..629ec750c 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -58,16 +58,16 @@ func (at *appTest) signTx(tx basecoin.Tx) basecoin.Tx { func (at *appTest) getTx(coins coin.Coins) basecoin.Tx { tx := at.baseTx(coins) - tx = base.NewChainTx(at.chainID, 0, tx) tx = nonce.NewTx(1, []basecoin.Actor{at.acctIn.Actor()}, tx) + tx = base.NewChainTx(at.chainID, 0, tx) return at.signTx(tx) } func (at *appTest) feeTx(coins coin.Coins, toll coin.Coin) basecoin.Tx { tx := at.baseTx(coins) tx = fee.NewFee(tx, toll, at.acctIn.Actor()) - tx = base.NewChainTx(at.chainID, 0, tx) tx = nonce.NewTx(1, []basecoin.Actor{at.acctIn.Actor()}, tx) + tx = base.NewChainTx(at.chainID, 0, tx) return at.signTx(tx) } diff --git a/cmd/basecli/commands/cmds.go b/cmd/basecli/commands/cmds.go index 2ab581c8b..cf97f9581 100644 --- a/cmd/basecli/commands/cmds.go +++ b/cmd/basecli/commands/cmds.go @@ -73,11 +73,11 @@ func doSendTx(cmd *cobra.Command, args []string) error { if err != nil { return err } - tx, err = WrapChainTx(tx) + tx, err = WrapNonceTx(tx) if err != nil { return err } - tx, err = WrapNonceTx(tx) + tx, err = WrapChainTx(tx) if err != nil { return err } diff --git a/docs/guide/counter/cmd/countercli/commands/counter.go b/docs/guide/counter/cmd/countercli/commands/counter.go index a3746b867..68fb86700 100644 --- a/docs/guide/counter/cmd/countercli/commands/counter.go +++ b/docs/guide/counter/cmd/countercli/commands/counter.go @@ -60,11 +60,11 @@ func counterTx(cmd *cobra.Command, args []string) error { if err != nil { return err } - tx, err = bcmd.WrapChainTx(tx) + tx, err = bcmd.WrapNonceTx(tx) if err != nil { return err } - tx, err = bcmd.WrapNonceTx(tx) + tx, err = bcmd.WrapChainTx(tx) if err != nil { return err } diff --git a/docs/guide/counter/plugins/counter/counter.go b/docs/guide/counter/plugins/counter/counter.go index d00f0fa90..d99a3c41e 100644 --- a/docs/guide/counter/plugins/counter/counter.go +++ b/docs/guide/counter/plugins/counter/counter.go @@ -102,8 +102,8 @@ func NewHandler(feeDenom string) basecoin.Handler { base.Logger{}, stack.Recovery{}, auth.Signatures{}, - nonce.ReplayCheck{}, base.Chain{}, + nonce.ReplayCheck{}, fee.NewSimpleFeeMiddleware(coin.Coin{feeDenom, 0}, fee.Bank), ).Use(dispatcher) } diff --git a/docs/guide/counter/plugins/counter/counter_test.go b/docs/guide/counter/plugins/counter/counter_test.go index b8b79a743..ff880c509 100644 --- a/docs/guide/counter/plugins/counter/counter_test.go +++ b/docs/guide/counter/plugins/counter/counter_test.go @@ -44,8 +44,8 @@ func TestCounterPlugin(t *testing.T) { // Deliver a CounterTx DeliverCounterTx := func(valid bool, counterFee coin.Coins, sequence uint32) abci.Result { tx := NewTx(valid, counterFee) - tx = base.NewChainTx(chainID, 0, tx) tx = nonce.NewTx(sequence, []basecoin.Actor{acct.Actor()}, tx) + tx = base.NewChainTx(chainID, 0, tx) stx := auth.NewSig(tx) auth.Sign(stx, acct.Key) txBytes := wire.BinaryBytes(stx.Wrap())