With Elon Musk’s acquisition of Twitter now closed, the panel of big law firms that advised both sides—in the boardroom and the courtroom—are closer to their final paycheck on the big deal.

After a detour in Delaware Chancery Court, the once-contentious deal could ultimately prove more lucrative for the lawyers than other straightforward acquisitions.