You'll very seldom find a spring in a hardware store that will fit and operate correctly in a gun.
Gun springs are purpose-made for that specific use and no other. Hardware springs are more general purpose where exact fit and strength are not important.
In my 30 years experience, I found that most "expedient" springs in guns almost never fit or worked correctly.
This is similar to gun screws. Gun screws are odd sizes and expensive, and people really want to just buy something locally. Almost never works.