hamas has never ever agreed to recognise Israel. What it has agreed is if Israel pulls back to the so called pre-1967 borders, hamas will respect a hudna (a long term ceasefire). They have openly declared NO recognision of Israel in any form whatsoever.
Iran deal opposition grows among U.S. Republicans, Reuters poll shows (Reuters)
from the article: Hamas leader accepts Iran invitation to attend Non-Aligned summit