From 5e8a22bc297d89990bde7d1929d556031bb27913 Mon Sep 17 00:00:00 2001 From: MSalopek Date: Fri, 6 Sep 2024 12:56:16 +0200 Subject: [PATCH] fix: update keyring; make install fix (#2228) --- cmd/interchain-security-cd/cmd/root.go | 11 ----------- cmd/interchain-security-cdd/cmd/root.go | 11 ----------- cmd/interchain-security-pd/cmd/root.go | 11 ----------- cmd/interchain-security-sd/cmd/root.go | 11 ----------- 4 files changed, 44 deletions(-) diff --git a/cmd/interchain-security-cd/cmd/root.go b/cmd/interchain-security-cd/cmd/root.go index 0a980f3452..5708d94b1b 100644 --- a/cmd/interchain-security-cd/cmd/root.go +++ b/cmd/interchain-security-cd/cmd/root.go @@ -18,7 +18,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -106,17 +105,7 @@ func enrichAutoCliOpts(autoCliOpts autocli.AppOptions, clientCtx client.Context) autoCliOpts.ValidatorAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()) autoCliOpts.ConsensusAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()) - var err error - clientCtx, err = config.ReadFromClientConfig(clientCtx) - if err != nil { - return autocli.AppOptions{}, err - } - autoCliOpts.ClientCtx = clientCtx - autoCliOpts.Keyring, err = keyring.NewAutoCLIKeyring(clientCtx.Keyring) - if err != nil { - return autocli.AppOptions{}, err - } return autoCliOpts, nil } diff --git a/cmd/interchain-security-cdd/cmd/root.go b/cmd/interchain-security-cdd/cmd/root.go index b71e1422c1..63f4dfec3b 100644 --- a/cmd/interchain-security-cdd/cmd/root.go +++ b/cmd/interchain-security-cdd/cmd/root.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -128,17 +127,7 @@ func enrichAutoCliOpts(autoCliOpts autocli.AppOptions, clientCtx client.Context) autoCliOpts.ValidatorAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()) autoCliOpts.ConsensusAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()) - var err error - clientCtx, err = config.ReadFromClientConfig(clientCtx) - if err != nil { - return autocli.AppOptions{}, err - } - autoCliOpts.ClientCtx = clientCtx - autoCliOpts.Keyring, err = keyring.NewAutoCLIKeyring(clientCtx.Keyring) - if err != nil { - return autocli.AppOptions{}, err - } return autoCliOpts, nil } diff --git a/cmd/interchain-security-pd/cmd/root.go b/cmd/interchain-security-pd/cmd/root.go index da0d719981..8079c6b2b7 100644 --- a/cmd/interchain-security-pd/cmd/root.go +++ b/cmd/interchain-security-pd/cmd/root.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -129,17 +128,7 @@ func enrichAutoCliOpts(autoCliOpts autocli.AppOptions, clientCtx client.Context) autoCliOpts.ValidatorAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()) autoCliOpts.ConsensusAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()) - var err error - clientCtx, err = config.ReadFromClientConfig(clientCtx) - if err != nil { - return autocli.AppOptions{}, err - } - autoCliOpts.ClientCtx = clientCtx - autoCliOpts.Keyring, err = keyring.NewAutoCLIKeyring(clientCtx.Keyring) - if err != nil { - return autocli.AppOptions{}, err - } return autoCliOpts, nil } diff --git a/cmd/interchain-security-sd/cmd/root.go b/cmd/interchain-security-sd/cmd/root.go index 5e65e536fb..97cba41bcf 100644 --- a/cmd/interchain-security-sd/cmd/root.go +++ b/cmd/interchain-security-sd/cmd/root.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -128,17 +127,7 @@ func enrichAutoCliOpts(autoCliOpts autocli.AppOptions, clientCtx client.Context) autoCliOpts.ValidatorAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()) autoCliOpts.ConsensusAddressCodec = addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()) - var err error - clientCtx, err = config.ReadFromClientConfig(clientCtx) - if err != nil { - return autocli.AppOptions{}, err - } - autoCliOpts.ClientCtx = clientCtx - autoCliOpts.Keyring, err = keyring.NewAutoCLIKeyring(clientCtx.Keyring) - if err != nil { - return autocli.AppOptions{}, err - } return autoCliOpts, nil }