Chinese technology firm Xunlei Ltd.’s offering of cryptocurrency through a cloud-computing rewards program did not violate China’s ban on token-based financing, a Manhattan federal judge said Tuesday in dismissing a securities class action that accused the company of hiding alleged illegality from American investors.

The lawsuit, filed in 2018, claimed that the Shenzhen-based online service provider created massive volatility in its stock by declining to address third-party trading of OneCoin, a blockchain-based “crypto token” meant to reward customers for buying into its crowdsourced computing system.