China’s attempt to punish American farmers for U.S. trade policies has not shaken support for President Donald Trump.

Farmer confidence in the agricultural economy soared in July, according to the Purdue Center for Commercial Agriculture’s latest survey of farmer sentiment. And expectations that the trade dispute with China will be resolved in a way that benefits U.S. farmers rose to their highest level of the year. The overall expectations index rose to 159 in July, 18 points higher than June and the highest reading in more than two years.

President Donald Trump is gaining in popularity among farmers. A Farm Journal Pulse survey conducted last month showed that 79 percent of farmers now approve of the job the president is doing, up from 74 percent in the June survey. Fifty-three percent said they “strongly approve” of President Trump, up from 50 percent in June.

Both surveys were taken before the most recent escalation of the trade war. Last week, Trump announced he would extend a then percent tariff over $300 billion of Chinese imports, and China said it was halting purchases of U.S. farm products.

President Trump responded by promising that the U.S. government would once again pay farmers for lost sales with revenue collected by tariffs. The U.S. collected $63 billion in tariffs in the 12 months preceding June 30th, about double what it collected in prior years. The U.S. authorized $12 billion in farm aid funds in 2018 and $16 billion this year:

As they have learned in the last two years, our great American Farmers know that China will not be able to hurt them in that their President has stood with them and done what no other president would do – And I’ll do it again next year if necessary! — Donald J. Trump (@realDonaldTrump) August 6, 2019

Farmers have good reason to feel more confident. Net farm income is forecast to increase $6.3 billion, or 10.0 percent, from 2018 levels to $69.4 billion in 2019, according to the Department of Agriculture. Cash receipts for both crops and animals are expected to rise as well. Median farm income is expected to rise 3.6 percent.

Chinese buyers imported $19.5 billion in U.S. farm goods in 2017. That was cut in half last year as China’s retaliatory tariffs made U.S. farm products more expensive and its state-directed enterprises dropped import orders. But overall, U.S. agricultural exports were valued at $140 billion in 2018, a one percent increase from the previous year.