Did minor code cleanup
This commit is contained in:
parent
32699c5985
commit
f4dd7f5a52
|
@ -9,7 +9,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/client/context"
|
"github.com/cosmos/cosmos-sdk/client/context"
|
||||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||||
clientx "github.com/cosmos/cosmos-sdk/client/tx"
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
|
@ -57,7 +56,7 @@ func NewSendTxCmd(m codec.Marshaler, txg tx.Generator, ar tx.AccountRetriever) *
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := types.NewMsgSend(cliCtx.GetFromAddress(), toAddr, coins)
|
msg := types.NewMsgSend(cliCtx.GetFromAddress(), toAddr, coins)
|
||||||
return clientx.GenerateOrBroadcastTx(cliCtx, txf, msg)
|
return tx.GenerateOrBroadcastTx(cliCtx, txf, msg)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ func NewTxCmd(m codec.Marshaler, txg tx.Generator, ar tx.AccountRetriever) *cobr
|
||||||
}
|
}
|
||||||
|
|
||||||
slashingTxCmd.AddCommand(NewUnjailTxCmd(m, txg, ar))
|
slashingTxCmd.AddCommand(NewUnjailTxCmd(m, txg, ar))
|
||||||
|
|
||||||
return slashingTxCmd
|
return slashingTxCmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
func RegisterHandlers(ctx context.CLIContext, m codec.Marshaler, txg tx.Generator, r *mux.Router) {
|
func RegisterHandlers(ctx context.CLIContext, m codec.Marshaler, txg tx.Generator, r *mux.Router) {
|
||||||
registerQueryRoutes(ctx, r)
|
registerQueryRoutes(ctx, r)
|
||||||
registerTxHandlers(ctx, m, txg, r)
|
registerTxHandlers(ctx, m, txg, r)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterRoutes registers staking-related REST handlers to a router
|
// RegisterRoutes registers staking-related REST handlers to a router
|
||||||
|
|
|
@ -29,7 +29,6 @@ type UnjailReq struct {
|
||||||
func NewUnjailRequestHandlerFn(ctx context.CLIContext, m codec.Marshaler, txg tx.Generator) http.HandlerFunc {
|
func NewUnjailRequestHandlerFn(ctx context.CLIContext, m codec.Marshaler, txg tx.Generator) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx = ctx.WithMarshaler(m)
|
ctx = ctx.WithMarshaler(m)
|
||||||
|
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
bech32Validator := vars["validatorAddr"]
|
bech32Validator := vars["validatorAddr"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue