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.
Clashes between IDF and protesters in Bethlehem and East Jerusalem (Reuters)
from the article: Hamas leader accepts Iran invitation to attend Non-Aligned summit