Shah was installed because Iran signed the deal in 1050s, so what's your point when you said US pulled its support for Shah because of the deal. the dots are not connecting.
read the same wki link you shared. it clearly says US supplied minimal amount of weapons to release its held hostages, so it was like a ransom. the war lasted for 8 years. that Ian contra affair lasted almost 1 year.
BUT. The U.S. primarily supported Iraq during the Iran-Iraq War (1980–1988) with economic aid, intelligence, and dual-use technology to counter Iran’s revolutionary government, while covertly selling arms to Iran through the Iran-Contra affair (1985–1986) to secure hostage releases, bypassing Congress. US and its Allies like Saudi Arabia, Kuwait, Jordan, Egypt, and the United Arab Emirates provided Iraq with financial aid, loans, and logistical support. The Soviet Union, France, China, USA and the United Kingdom supplied Iraq with weapons and military equipment