3 wires, if they were wired correctly from the start (you should test this) then the black is line, white in neutral and the 3rd green wire is ground.
If the bare metal casing is actually contacting the metal heat sink then that would work, most steel casings I seen are powdercoated which...