refactor(client): use address codec (#17503)
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/codec/address"
|
||||
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
@@ -52,7 +52,10 @@ func (s *CLITestSuite) SetupSuite() {
|
||||
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
|
||||
WithAccountRetriever(client.MockAccountRetriever{}).
|
||||
WithOutput(io.Discard).
|
||||
WithChainID("test-chain")
|
||||
WithChainID("test-chain").
|
||||
WithAddressCodec(addresscodec.NewBech32Codec("cosmos")).
|
||||
WithValidatorAddressCodec(addresscodec.NewBech32Codec("cosmosvaloper")).
|
||||
WithConsensusAddressCodec(addresscodec.NewBech32Codec("cosmosvalcons"))
|
||||
|
||||
ctxGen := func() client.Context {
|
||||
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
|
||||
@@ -97,7 +100,7 @@ func (s *CLITestSuite) TestNewUnjailTxCmd() {
|
||||
tc := tc
|
||||
|
||||
s.Run(tc.name, func() {
|
||||
cmd := cli.NewUnjailTxCmd(address.NewBech32Codec("cosmosvaloper"))
|
||||
cmd := cli.NewUnjailTxCmd(addresscodec.NewBech32Codec("cosmosvaloper"))
|
||||
clientCtx := s.clientCtx
|
||||
|
||||
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
|
||||
|
||||
Reference in New Issue
Block a user