The heads of the world’s two largest economies brushed over differences on North Korea and trade as they met in person for the second time. The unlikely diplomatic friendship of President Donald Trump and Chinese President Xi Jinping seemed to hold firm as the pair met Saturday on the sidelines of the Group of 20 meetings in Hamburg. Heading into the meeting, Trump told Xi it was “an honor” to have gotten to know him, and that he “appreciated the things” China’s leader had done on North Korea. Trump later included Xi in a series of buoyant tweets sent from Air Force One as he returned to Washington. “Just left China’s President Xi where we had an excellent meeting on trade & North Korea,” he wrote. U.S. and Chinese officials suggested they were satisfied with the talks, which ran for about 90 minutes. The details of their discussion suggest the leaders are seeking to keep ties on an even keel. Trump doesn’t appear to have given up on the relationship despite recent posts on Twitter blasting China for not moving fast enough to rein in North Korean leader Kim Jong Un. Pyongyang Threat Still, challenges remain. Kim is unlikely to suddenly halt his weapons program, having last week trumpeted his first successful test of an intercontinental ballistic missile capable of reaching at least part of the U.S. While Trump has put trade and currency tensions on the backburner, if his patience runs out on China he could revive his threat of a trade war. “The question is what Trump may do about China,” said Zhang Baohui, director of Lingnan University’s Center for Asian Pacific Studies in Hong Kong. “If he decides to punish Sino-U.S. relations we will see rising instability in East Asia, especially if Trump pokes the One-China issue” which covers relations with Taiwan. Xi told Trump he believed ties had strengthened since their first meeting at Trump’s Mar-a-Lago resort in Florida in April, according to the official Xinhua News Agency. Losing Patience? In exchange for China’s help with its neighbor and ally North Korea, Trump initially backed off threats made during his presidential campaign to declare China a currency manipulator. But his tweets before the meeting suggested that he was losing patience. “So much for China working with us - but we had to give it a try!” Trump said in on Twitter on July 5. That followed a June 20 missive that “While I greatly appreciate the efforts of President Xi & China to help with North Korea, it has not worked out.” Diplomatic sources reported that Trump scowled and sat with his arms folded as Xi spoke over lunch during G-20 meetings on Friday. In the event, though, the talks were cast as having gone well despite both sides stating their positions firmly. Treasury Secretary Steve Mnuchin described the meeting as “very substantive” and lauded the “warmness, the openness” between the pair. The discussions included the issue of cutting off finances to North Korea and ways of dealing together with Pyongyang, he said. “President Trump made very clear to President Xi that he’s focused on these issues and wants to make progress, and I think President Xi gave a very interesting perspective of their standpoint,” Mnuchin said. Missile Shield Xi told Trump that China had already stated its “principled position” on North Korea multiple times, according to Xinhua. He said that even when responding to violations of United Nations Security Council resolutions, it was important to encourage dialogue. He also reiterated China’s opposition to the partial U.S. deployment so far of the Terminal High Altitude Area Defense shield in South Korea.  “This is China holding the ground on the North Korean issue and also a show of confidence that China-U.S. relations are so deeply entwined and mutually dependent that they won’t be easily derailed by North Korea,” said Jia Qingguo, dean of Peking University’s diplomacy department and a foreign affairs adviser to the government.  “It’s an important element in this multi layered relationship, but it’s still a leaf, however big it is, not the forest,” Jia said. Despite Trump’s pressure on China ahead of the meeting, Chinese officials privately insisted that Trump’s regular tweets were just bargaining tactics. Publicly, they countered him with a mixture of flattery and inclusiveness. Vice Finance Minister Zhu Guangyao told journalists on Thursday that no country should be excluded when asked if China would sign a “G-19” agreement on climate change without the U.S. He also said the Chinese had “read with respect” Trump’s books on deal making, written when he was a real estate entrepreneur and television personality. Given Trump’s harsh campaign rhetoric against China, he and Xi established a surprisingly friendly relationship after their first meeting, less than three months after Trump’s inauguration. Since then, the dialogue between the two countries has been extensive. Trump and Xi have talked by phone several times, while Trump’s son-in-law and senior adviser Jared Kushner has spoken with Cui Tiankai, China’s ambassador to the U.S. Bloomberg reported in June that China had invited Trump’s daughter Ivanka to visit this year together with husband Kushner. Trump has committed to visiting China before the end of the year.