The first is the correct use of the suspended hyphen. Many argue that there is no longer a need to hyphenate phrases like this, so, depending on whether or not you adopt that thinking, the second sentence might also be viewed as correct. I personally prefer the suspended hyphen.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.