Both are correct. The past is often substituted for the past perfect, so in this case both sentences have the same meaning. The second is perhaps a more careful description of the situation.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.