Converting getExchangeRate and getCountries into the async function