Skip to content

Commit

Permalink
PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
testinginprod committed Sep 17, 2024
1 parent 5832eef commit 4ac3aa8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions x/auth/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,9 @@ func (s queryServer) AccountInfo(ctx context.Context, req *types.QueryAccountInf
account := s.k.GetAccount(ctx, addr)
if account == nil {
xAccount, err := s.getFromXAccounts(ctx, addr)
if err != nil {
return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address)
}
// account info is nil it means that the account can be encapsulated into a
// legacy account representation but not a base account one.
if xAccount.Info == nil {
if err != nil || xAccount.Info == nil {
return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address)
}
return &types.QueryAccountInfoResponse{Info: xAccount.Info}, nil
Expand Down

0 comments on commit 4ac3aa8

Please sign in to comment.