Skip to content

Commit 4ac3aa8

Browse files
committed
PR review comments
1 parent 5832eef commit 4ac3aa8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: x/auth/keeper/grpc_query.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,9 @@ func (s queryServer) AccountInfo(ctx context.Context, req *types.QueryAccountInf
229229
account := s.k.GetAccount(ctx, addr)
230230
if account == nil {
231231
xAccount, err := s.getFromXAccounts(ctx, addr)
232-
if err != nil {
233-
return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address)
234-
}
235232
// account info is nil it means that the account can be encapsulated into a
236233
// legacy account representation but not a base account one.
237-
if xAccount.Info == nil {
234+
if err != nil || xAccount.Info == nil {
238235
return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address)
239236
}
240237
return &types.QueryAccountInfoResponse{Info: xAccount.Info}, nil

0 commit comments

Comments
 (0)