From ca39860f7eec4ac4a620e98d98891b16e10c3baf Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 17 Jul 2024 22:16:20 +0200 Subject: [PATCH] chore: wire client/v2 fix (#4264) --- ignite/templates/app/files-consumer/app/app.go.plush | 1 + ignite/templates/app/files-minimal/app/app.go.plush | 1 + ignite/templates/app/files/app/app.go.plush | 1 + .../app/files/cmd/{{binaryNamePrefix}}d/main.go.plush | 3 ++- ignite/templates/app/files/go.mod.plush | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ignite/templates/app/files-consumer/app/app.go.plush b/ignite/templates/app/files-consumer/app/app.go.plush index cecb2bf086..d2e994bd99 100644 --- a/ignite/templates/app/files-consumer/app/app.go.plush +++ b/ignite/templates/app/files-consumer/app/app.go.plush @@ -135,6 +135,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files-minimal/app/app.go.plush b/ignite/templates/app/files-minimal/app/app.go.plush index 04575ece5d..a663f01fa8 100644 --- a/ignite/templates/app/files-minimal/app/app.go.plush +++ b/ignite/templates/app/files-minimal/app/app.go.plush @@ -79,6 +79,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files/app/app.go.plush b/ignite/templates/app/files/app/app.go.plush index 68b0799eeb..504a3b392f 100644 --- a/ignite/templates/app/files/app/app.go.plush +++ b/ignite/templates/app/files/app/app.go.plush @@ -146,6 +146,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush index b151788080..2592235774 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush @@ -4,6 +4,7 @@ import ( "fmt" "os" + clienthelpers "cosmossdk.io/client/v2/helpers" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "<%= ModulePath %>/app" @@ -12,7 +13,7 @@ import ( func main() { rootCmd := cmd.NewRootCmd() - if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { + if err := svrcmd.Execute(rootCmd, clienthelpers.EnvPrefix, app.DefaultNodeHome); err != nil { fmt.Fprintln(rootCmd.OutOrStderr(), err) os.Exit(1) } diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index cf9a3fe6d6..bfa98c6e80 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -11,7 +11,7 @@ replace ( require ( cosmossdk.io/api v0.7.5 - cosmossdk.io/client/v2 v2.0.0-beta.3 + cosmossdk.io/client/v2 v2.0.0-beta.4 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 cosmossdk.io/depinject v1.0.0-alpha.4