https://www.newsweek.com/who-are-americans-currently-detained-iran-659182
Iranian Foreign Minister Mohammad Javad Zarif stated that Wangs release is part of a prisoner swap, with the United States freeing Iranian scientist Massoud Soleimani. In an interview in Sept. 2019, Zarif said he had offered to swap Wang and an Iranian professor over a year ago.
Soleimani had been arrested in the United States in 2016 for allegedly violating trade sanctions by attempting to transport biological material to Iran. Prior to the prisoner swap, Soleimani was facing a federal trial in Georgia, according to Bloomberg.
Soleimani claims he was transporting medicine to Iranian patients, but the US charges suggest that it may have been more than medicine. Possibly stem cell treatments or other prohibited research, to sell to Iran.