You're real estate agent friend is probably not familiar with wholesaling. Your friend is familiar with the real estate laws in your state, but he's probably not familiar with ways to skirt the law (which is what wholesaling is).
If he contacts the real estate commission they're going to tell him wholesaling is illegal. They love scaring people into obtaining a real estate license. Of course, we all know it's not.... yet. Selling properties is illegal in most states if you don't have a license or some form of equitable interest(i.e. ownership or a contract to purchase). The good thing about your transaction is the fact that your fee is being disclosed on the HUD Statement. The bad news- you don't have any contract to claim equitable interest so you're acting as a third party broker. You know the saying if it looks like a duck, walks like a duck.... .
Do a simple purchase contract between you and the wholesaler and/or at the very least have him sign a joint venture agreement. Also, consider a double close. You could close out the first transaction with the seller and wholesaler. Then close out the second transaction later in the day(or even a few minutes later) with your buyer. You would need a transactional lender- I use my private money guy, but look around your town for one. I'm sure you will find a private lender or hard money guy willing to help you for a small fee(2%-3% of what you borrow).
Know your business- you're selling contracts NOT real estate. Make sure you connect with a good real estate attorney and pay them to create a solid contract that you can use for every deal. Best of luck to you.
Chris