From 184e1586b70eaedb07a76326ec56373d31328cfe Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 27 Sep 2023 14:06:09 +0200 Subject: [PATCH 1/2] return accid in error --- x/auth/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index f2afb98ae1bb..8272bc119865 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -36,7 +36,7 @@ func (s queryServer) AccountAddressByID(ctx context.Context, req *types.QueryAcc address, err := s.k.Accounts.Indexes.Number.MatchExact(ctx, accID) if err != nil { - return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", req.Id) + return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", accId) } addr, err := s.k.addressCodec.BytesToString(address) From 59534e8e759139112315b2cd27fe95c872c8fd4a Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 27 Sep 2023 14:07:04 +0200 Subject: [PATCH 2/2] fix variable name --- x/auth/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 8272bc119865..19698eacc3de 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -36,7 +36,7 @@ func (s queryServer) AccountAddressByID(ctx context.Context, req *types.QueryAcc address, err := s.k.Accounts.Indexes.Number.MatchExact(ctx, accID) if err != nil { - return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", accId) + return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", accID) } addr, err := s.k.addressCodec.BytesToString(address)