diff --git a/finality-provider/cmd/cmd.go b/finality-provider/cmd/cmd.go index 52aa4061..8da3b6bd 100644 --- a/finality-provider/cmd/cmd.go +++ b/finality-provider/cmd/cmd.go @@ -1,6 +1,7 @@ package cmd import ( + "context" "os" "github.com/cosmos/cosmos-sdk/client" @@ -30,6 +31,10 @@ func PersistClientCtx(ctx client.Context) func(cmd *cobra.Command, _ []string) e WithLegacyAmino(tempApp.LegacyAmino()). WithInput(os.Stdin) + // ensure cmd context is not nil. Later it will be replaced + // by SetCmdClientContextHandler + cmd.SetContext(context.Background()) + // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) cmd.SetErr(cmd.ErrOrStderr())