refactor(authz):remove global bech32 (#15662)

This commit is contained in:
Marko
2023-04-03 13:55:32 +02:00
committed by GitHub
parent b4d1109efc
commit 521aa4bfdd
20 changed files with 141 additions and 64 deletions
+4 -3
View File
@@ -6,6 +6,7 @@ import (
"time"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec/address"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/authz"
@@ -76,7 +77,7 @@ func (s *E2ETestSuite) TestQueryAuthorizations() {
tc := tc
s.Run(tc.name, func() {
cmd := cli.GetCmdQueryGrants()
cmd := cli.GetCmdQueryGrants(address.NewBech32Codec("cosmos"))
clientCtx := val.ClientCtx
resp, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.expectErr {
@@ -180,7 +181,7 @@ func (s *E2ETestSuite) TestQueryAuthorization() {
tc := tc
s.Run(tc.name, func() {
cmd := cli.GetCmdQueryGrants()
cmd := cli.GetCmdQueryGrants(address.NewBech32Codec("cosmos"))
clientCtx := val.ClientCtx
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.expectErr {
@@ -249,7 +250,7 @@ func (s *E2ETestSuite) TestQueryGranterGrants() {
}
for _, tc := range testCases {
s.Run(tc.name, func() {
cmd := cli.GetQueryGranterGrants()
cmd := cli.GetQueryGranterGrants(address.NewBech32Codec("cosmos"))
clientCtx := val.ClientCtx
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.expectErr {
+2 -1
View File
@@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/cosmos/cosmos-sdk/client/flags"
"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/testutil"
@@ -665,7 +666,7 @@ func (s *E2ETestSuite) TestCmdRevokeAuthorizations() {
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
cmd := cli.NewCmdRevokeAuthorization()
cmd := cli.NewCmdRevokeAuthorization(address.NewBech32Codec("cosmos"))
clientCtx := val.ClientCtx
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)