Having or selling a gun should not be a crime; even for criminals.
They said it was an “undercover”. Maybe the cop said “hey I’m a felon can I buy a gun from you?”