To me, the insulting nature of your comment stemmed not from the economic status of Nigeria as a poor country (or the skin color of its residents) but the fact that you were jokingly implying the OP was involved in something illegal.
A joke about a Russian entrepreneur selling vodka, for example, would not be insulting, just trite. Which, quality of content wise, is equally bad.