Inside an async function i have a loop and inside this loop i need to use await to resolve a promise from another async function.