North Korea has always been a pawn of China to make the US busy so that they won't pay attention to what is actually going on in the South China Sea and trade. China can also gain leverage on trade issues by helping the US control this "threat".
Trump saw through this trick, and decided to do a "turn somebody's trick against him" -
https://zh.glosbe.com/zh/en/将计就计. He succeeded because Kim realised that being Xi's pawn is not getting him anywhere. Kim played along and helped Trump all the way. Regardless of what happens to the "peace talks", the north korean threat won't be taken seriously any more and China is now no longer seen as needed to help control Kim. In fact, all the peace talks are done outside of China.