Treaty of Friendship, Commerce, and Navigation

&nbsp In Anno Domini 1860 the Japanese built ship Karin Maru was sent from Japan to the City of San Francisco in an attempt to establish a Treaty of Friendship, Commerce, and Navigation between the United States and Japan.

In OTL it was denied by the US Senate, but what if it wasn't?

What if instead the treaty was signed and the United States and Japan became closer trading partners and possibly even allies...

How would this affect the Meiji Restoration, the development of Japan into a world power, and the World Wars?