Xi Jinping appears to again be back in Donald Trump's good graces — at least for now.

Last week, it looked as if the leaders of the world's biggest economies were on a collision course. North Korea's second intercontinental ballistic missile (ICBM) test in a matter of weeks prompted Trump to lash out at China on Twitter, and a few days later came reports that his administration was getting ready to take steps that could lead to a trade war.

That all changed with a breakthrough at the United Nations on Saturday. After a month of talks, the U.S. and China agreed on sanctions that would cut North Korea's exports by a third, punish some of its biggest companies and cap the number of its citizens working in other countries at current levels.