No, they should be fine. If you are just letting them rob the old hive, then the moths won't transfer.
Regardless, it didn't look like you had a really bad infestation of moths, a strong hive should be able to kick that if you had just combined them.
But if you haven't combined them yet, I'd still try to freeze them at first chance (although thats tougher now with all the robbers), and you can probably put the old box on the new hive soon.
Rick