From ab45a85307c66d7413b4575aeb9851448b75f461 Mon Sep 17 00:00:00 2001 From: Emil Georgiev Date: Fri, 5 Apr 2024 13:31:23 +0300 Subject: [PATCH] fix(x/authz): non utf-8 characters in logs (#19923) Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> --- x/authz/CHANGELOG.md | 4 ++++ x/authz/keeper/keeper.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/x/authz/CHANGELOG.md b/x/authz/CHANGELOG.md index 0963382c9e..2caad8f47e 100644 --- a/x/authz/CHANGELOG.md +++ b/x/authz/CHANGELOG.md @@ -43,3 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Consensus Breaking Changes * [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist. + +### Bug Fixes + +* [#19874](https://github.com/cosmos/cosmos-sdk/pull/19923) Now when querying transaction events (cosmos.tx.v1beta1.Service/GetTxsEvent) the response will contains only UTF-8 characters \ No newline at end of file diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index a4347e6132..3feafa9003 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -220,7 +220,8 @@ func (k Keeper) DeleteGrant(ctx context.Context, grantee, granter sdk.AccAddress skey := grantStoreKey(grantee, granter, msgType) grant, found := k.getGrant(ctx, skey) if !found { - return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, "failed to delete grant with key %s", string(skey)) + return errorsmod.Wrapf(authz.ErrNoAuthorizationFound, + "failed to delete grant with given granter: %s, grantee: %s & msgType: %s ", granter.String(), grantee.String(), msgType) } if grant.Expiration != nil {