I'm basing it off a recent reading of
The Cooking Gene, by Michael Twitty, which is ostensibly a history of African-American cooking in the South, but is in practice a very deep and well-researched history of the slave trade, by way of its food.
Doing a little more checking on what Twitty has to say (he's the authoritative source as far as I'm concerned), it looks like both interpretations are true:
"The yams of West Africa are not sweet potatoes, however sweet potatoes did fit well into cultures already used to relying on root crops. When Africans encounter sweet potatoes as enslaved people they utilized them in ways similar to tropical yams. Later, African varieties of sweet potato, like the Dahomey sweet potato, cross the Atlantic ocean and come to America."
https://afroculinaria.com/2016/10/05/crops-of-african-origin...
edit: One thing you learn from reading Twitty and other modern voices on the subject is just how extensively whitewashed even "scientific" history can be, and how much African contribution gets erased.