They're both fine. There are many cases where there's no choice between the infinitive phrase and the participial phrase, just as the infinitive and the gerund are often interchangeable. But of course it's not true in every case.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.