chore(feegrant): remove address.String() calls (#17869)

This commit is contained in:
Marko
2023-09-25 16:03:32 +00:00
committed by GitHub
parent 31db604d61
commit 1e40dc8e3f
18 changed files with 218 additions and 100 deletions
+6 -4
View File
@@ -44,8 +44,8 @@ func TestFeegrantPruning(t *testing.T) {
accountKeeper.EXPECT().GetAccount(gomock.Any(), granter1).Return(authtypes.NewBaseAccountWithAddress(granter1)).AnyTimes()
accountKeeper.EXPECT().GetAccount(gomock.Any(), granter2).Return(authtypes.NewBaseAccountWithAddress(granter2)).AnyTimes()
accountKeeper.EXPECT().GetAccount(gomock.Any(), granter3).Return(authtypes.NewBaseAccountWithAddress(granter3)).AnyTimes()
accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes()
ac := address.NewBech32Codec("cosmos")
accountKeeper.EXPECT().AddressCodec().Return(ac).AnyTimes()
feegrantKeeper := keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), accountKeeper)
@@ -85,8 +85,10 @@ func TestFeegrantPruning(t *testing.T) {
module.EndBlocker(testCtx.Ctx, feegrantKeeper)
granteeStr, err := ac.BytesToString(grantee)
require.NoError(t, err)
res, err := queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{
Grantee: grantee.String(),
Grantee: granteeStr,
})
require.NoError(t, err)
require.NotNil(t, res)
@@ -96,7 +98,7 @@ func TestFeegrantPruning(t *testing.T) {
module.EndBlocker(testCtx.Ctx, feegrantKeeper)
res, err = queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{
Grantee: grantee.String(),
Grantee: granteeStr,
})
require.NoError(t, err)
require.NotNil(t, res)