As long as you don’t put the cake in the fridge the royal icing should be fine. The fondant will protect it from the moisture in the cake.
Jennifer, https://www.facebook.com/PrimaCakesandCookies