Skip to content

Commit 98264a9

Browse files
committed
Backport part of cosmos#1653
1 parent 48a6ae5 commit 98264a9

File tree

3 files changed

+2
-298
lines changed

3 files changed

+2
-298
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
package client
22

33
import (
4-
"net/http"
5-
6-
"github.com/cosmos/cosmos-sdk/client"
7-
"github.com/cosmos/cosmos-sdk/types/rest"
84
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
9-
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
105

116
"github.com/cosmos/ibc-go/v4/modules/core/02-client/client/cli"
127
)
138

149
var (
15-
UpdateClientProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpdateClientProposal, emptyRestHandler)
16-
UpgradeProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal, emptyRestHandler)
10+
UpdateClientProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpdateClientProposal)
11+
UpgradeProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal)
1712
)
18-
19-
func emptyRestHandler(client.Context) govrest.ProposalRESTHandler {
20-
return govrest.ProposalRESTHandler{
21-
SubRoute: "unsupported-ibc-client",
22-
Handler: func(w http.ResponseWriter, r *http.Request) {
23-
rest.WriteErrorResponse(w, http.StatusBadRequest, "Legacy REST Routes are not supported for IBC proposals")
24-
},
25-
}
26-
}

testing/sdk_test.go

-279
This file was deleted.

testing/simapp/app.go

-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"github.com/cosmos/cosmos-sdk/version"
3131
"github.com/cosmos/cosmos-sdk/x/auth"
3232
"github.com/cosmos/cosmos-sdk/x/auth/ante"
33-
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
3433
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
3534
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
3635
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
@@ -760,8 +759,6 @@ func (app *SimApp) SimulationManager() *module.SimulationManager {
760759
func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
761760
clientCtx := apiSvr.ClientCtx
762761
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
763-
// Register legacy tx routes.
764-
authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)
765762
// Register new tx routes from grpc-gateway.
766763
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
767764
// Register new tendermint queries routes from grpc-gateway.

0 commit comments

Comments
 (0)