Trump pushed it right to the edge and he almost fell off. Forces were aligning to remove him from office, his popularity was dropping further by the day and oil had hit $144 a barrel. Trump is not a warrior, he's a businessman. He knows that $144 oil means economic collapse and total political defeat in the midterms, leading directly to impeachment and, if it went on, conviction in the Senate not for process crimes but for war crimes. They might have even thrown his ass in prison.
The war is over. Iran won.