From 252030c6b6554d747c5458ab7b9eef526c72db74 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 27 Nov 2018 16:09:20 -0500 Subject: [PATCH] Update examples --- docs/examples/basecoin/cmd/basecli/main.go | 6 +----- docs/examples/democoin/cmd/democli/main.go | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/examples/basecoin/cmd/basecli/main.go b/docs/examples/basecoin/cmd/basecli/main.go index 8093dd3b10..6e274123e6 100644 --- a/docs/examples/basecoin/cmd/basecli/main.go +++ b/docs/examples/basecoin/cmd/basecli/main.go @@ -52,10 +52,6 @@ func main() { config.SetBech32PrefixForConsensusNode("basecons", "baseconspub") config.Seal() - rs := lcd.NewRestServer(cdc) - - registerRoutes(rs) - // TODO: Setup keybase, viper object, etc. to be passed into // the below functions and eliminate global vars, like we do // with the cdc. @@ -104,7 +100,7 @@ func main() { // add proxy, version and key info rootCmd.AddCommand( client.LineBreak, - rs.ServeCommand(), + lcd.ServeCommand(cdc, registerRoutes), keys.Commands(), client.LineBreak, version.VersionCmd, diff --git a/docs/examples/democoin/cmd/democli/main.go b/docs/examples/democoin/cmd/democli/main.go index a001ee8b5f..d3d0e5ff08 100644 --- a/docs/examples/democoin/cmd/democli/main.go +++ b/docs/examples/democoin/cmd/democli/main.go @@ -48,10 +48,6 @@ func main() { config.SetBech32PrefixForConsensusNode("democons", "democonspub") config.Seal() - rs := lcd.NewRestServer(cdc) - - registerRoutes(rs) - // TODO: setup keybase, viper object, etc. to be passed into // the below functions and eliminate global vars, like we do // with the cdc @@ -94,7 +90,7 @@ func main() { // add proxy, version and key info rootCmd.AddCommand( client.LineBreak, - rs.ServeCommand(), + lcd.ServeCommand(cdc, registerRoutes), keys.Commands(), client.LineBreak, version.VersionCmd,