Skip to content

Commit

Permalink
use dummy handler for evm proposal handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Vizualni committed Jul 18, 2022
1 parent d9731ff commit 0fa628f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion x/evm/client/proposal_handler.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
package client

import (
"fmt"
"net/http"

"github.com/cosmos/cosmos-sdk/client"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
"github.com/cosmos/cosmos-sdk/x/gov/client/rest"
"github.com/palomachain/paloma/x/evm/client/cli"
)

var ProposalHandler = govclient.NewProposalHandler(cli.CmdEvmChainProposalHandler, nil)
var ProposalHandler = govclient.NewProposalHandler(cli.CmdEvmChainProposalHandler, func(client.Context) rest.ProposalRESTHandler {
return rest.ProposalRESTHandler{
SubRoute: "evm-not-implemented",
Handler: func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotImplemented)
fmt.Fprintf(w, "please use cli to issue a new EVM proposal or make a new github ticket if you wish to have this functionality via rest")
},
}
})

0 comments on commit 0fa628f

Please sign in to comment.