If President Trump approves the latest deal for video-sharing app TikTok, Oracle (ORCL -0.39%) will emerge with a 20% minority stake in the company and Walmart (WMT 0.57%) will become a partner. The latter's CEO, Doug McMillon, will also get a seat on the board of directors for the U.S. operations of TikTok.

Yet because the app's Chinese parent, ByteDance, will retain a majority stake, the deal could still collapse since Trump has said he wants it sold to an American company or its U.S. business will be shut down.

Couple mugging for their smartphone camera

Image source: Getty Images.

The evolving drama over TikTok involves a Sept. 20 deadline for coming up with an acceptable plan to address U.S. national security concerns surrounding the app. Because of the vast amount of data ByteDance surreptitiously collects on TikTok users, administration officials worry it could be used for blackmail, corporate espionage, or tracking government workers with the app on their phone.

ByteDance reportedly stopped collecting the data in December, but some remain concerned about its close ties with Beijing, which ByteDance denies having.

Although there was initially a flurry of interest among tech companies about buying the app, only Oracle and Microsoft (MSFT -2.45%) emerged as serious contenders. ByteDance, though, rejected Microsoft's bid as insufficient and chose Oracle as a "trusted partner."

That left Oracle as the remaining bidder, and Walmart agreed to join with the tech giant in its offer. Yet ByteDance has resisted an outright sale of the app and floated the idea of a spinoff instead, with Oracle holding a small stake. It reportedly fully agreed to Treasury Department revisions for security issues.

Trump is said to be ready to make a decision within 24 to 36 hours, but Beijing will also need to sign off under new regulations it passed in the wake of the controversy.